November 2018
Intermediate to advanced
528 pages
13h 21m
English
Now, it is time to configure Truffle. First, we need to define the networks to which we want to migrate the contracts. In the truffle.js file (truffle-config.js for Windows), insert the following code:
module.exports = { networks: { my_ganache: { host: "127.0.0.1", port: 7545, network_id: "*" } } };We define a deployment network with the name my_ganache along with a few parameters. The network name is used for user-interface purposes, to help you easily choose to run your migrations on a specific network with a name, as we can configure Truffle to use multiple networks.
Basically, this configuration file says to Truffle that when we choose the my_ganache network, connect to the host at 127.0.0.1, using port 7545. For ...
Read now
Unlock full access