第一个Truffle小程序(Mac)

Step1: install truffle

$npm install -g truffle

 

Step2: install nodejs

$brew install node

 

Step3: check truffle and node version

$Truffle version

$Node -v

Step4: initial webpack

$Truffle unbox webpack

Step5: compile

$truffle compile

Step6: migrate

$truffle migrate

modify truffle.js to below information and execute again

**************************************************** 

module.exports = {

networks: {

development: {

host: 'localhost',

port: 8545,

network_id: '*' // Match any network id

}

}

}

**************************************************** 

 

Step7: run dev[need go to directory first:]

cd /Users/rongfang/myproject/project2/

$npm run dev

 

Step8: open url

http://localhost:8080/

posted @ 2018-03-01 17:40  Katierong  阅读(178)  评论(0)    收藏  举报