Blockchain technology (i): Introduction to truffle development

Source: Internet
Author: User

Ethereum is the best programming platform in the area of blockchain development, and truffle is the most popular development framework of Ethereum (Ethereum), which is the reason why our first blockchain technology article introduces truffle, the actual combat is the most important thing, this article does not speak the principle, only build the environment, Run the first Blockchain program (DAPP).

Installing truffle

$ NPM install-g Truffle

Dependent environment NodeJS visit https://nodejs.org official website Download install

System: Windows, Linux or Mac OS X, recommended Mac OS X, not recommended for Windows, will encounter a variety of problems that lead to abandonment.

The Ethereum client needs to be installed to support the JSON RPC API call development environment and the recommended use of ETHEREUMJS TESTRPC:HTTPS://GITHUB.COM/ETHEREUMJS/TESTRPC

Install Command: $ NPM install-g ETHEREUMJS-TESTRPC

Create a new first project

$ mkdir Zhaoxi

$ CD Zhaoxi

$ truffle Init

A metacoin demo is generated by default, and you can learn the truffle architecture from this demo.

Project directory Structure

Project All Files directory

Compiling the project

$ truffle Compile

Deployment Project

Start TESTRPC before deploying

$ testrpc

$ truffle deploy (in truffle 2.0 or later, the command becomes: Truffle migrate) $ truffle migrate execution result

Start the service

$ truffle Serve

After starting the service, you can access the project in the browser: http://localhost:8080/, the Web interface is as follows:

Well, the first blockchain is running, and you can keep practicing in-depth learning in the back. If you have any questions, please contact me.

Original: http://wangxiaoming.com/blog/2016/04/30/blockchain-tech-truffle/

Blockchain technology (i): Introduction to truffle development

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.