Then install truffle
npm install --global truffleCreate metacoin example project
mkdir metacoin
cd metacoin
truffle unbox metacoinUpdate truffle.js with the following:
module.exports = {
// See <http://truffleframework.com/docs/advanced/configuration>
// to customize your Truffle configuration!
networks: {
ganache: {
host: "127.0.0.1",
port: 7545,
network_id: "5777" // ganache network id
}
}
};Run migrations
truffle migrate --network ganacheRun tests
truffle test --network ganache