• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

dougvk/truffle3-frontend-example: Frontend example using truffle v3

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

dougvk/truffle3-frontend-example

开源软件地址:

https://github.com/dougvk/truffle3-frontend-example

开源编程语言:

JavaScript 66.0%

开源软件介绍:

truffle3-frontend-example

In order to build and run the frontend code LOCALLY, run

  1. yarn install or npm install depending on your preference
  2. make sure you have testrpc running , and change truffle.js to point to that network. e.g. localhost:8545.
  3. truffle compile to create the json contract artifacts
  4. truffle migrate to deploy the contracts onto the network
  5. change the web3 provider in app/main.js to point to the testrpc server.
  6. npm run build to compile the javascript and html assets into the build folder
  7. truffle serve to serve the assets in the build folder
  8. navigate to the host and port that truffle is serving (default, localhost:8080) in order to see the served assets

In order to build and run the frontend code IN DOCKER, run

  1. docker-compose -f docker/docker-compose.yml up -d
  2. once the container starts, find the hash of the truffle3_container service and run docker attach <hash>
  3. yarn install or npm install depending on your preference
  4. change truffle.js to point to that network. this is testrpc:8545 from inside the container
  5. truffle compile to create the json contract artifacts
  6. truffle migrate to deploy the contracts onto the network
  7. change the web3 provider in app/main.js to point to the testrpc server. !! this will be localhost:7000 !!
  8. npm run build to compile the javascript and html assets into the build folder
  9. truffle serve to serve the assets in the build folder
  10. navigate to localhost:7001/index.html in your browser to see the served assets

Possible upgrades

  • Use the webpack hotloader to sense when contracts or javascript have been recompiled and rebuild the application



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
n9e/fe: n9e frontend发布时间:2022-06-07
下一篇:
Wilfred/ag.el: An Emacs frontend to The Silver Searcher发布时间:2022-06-07
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap