Skip to Content
Building Blockchain Projects
book

Building Blockchain Projects

by Narayan Prusty
April 2017
Intermediate to advanced
266 pages
7h 4m
English
Packt Publishing
Content preview from Building Blockchain Projects

Truffle's server

Truffle comes with an in-built web server. This web server simply serves the files in the build directory with a proper MIME type set. Apart from this, it's not configured to do anything else.

To run the web server, run this command:

truffle serve

The server runs on port number 8080 by default. But you can use the -p option to specify a different port number.

Similar to truffle watch, this web server also watches for changes in the contracts directory, the app directory, and the configuration file. When there's a change, it recompiles the contracts and generates new artifacts files and then rebuilds the client. But it doesn't run migrations and tests.

As the truffle-default-builder places the final deployable code in the ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Building Blockchain Apps

Building Blockchain Apps

Michael Juntao Yuan
Blockchain Development with Hyperledger

Blockchain Development with Hyperledger

Salman A. Baset, Luc Desrosiers, Nitin Gaur, Petr Novotny
Advanced Blockchain Development

Advanced Blockchain Development

Imran Bashir, Narayan Prusty

Publisher Resources

ISBN: 9781787122147Supplemental Content