Setting up Truffle to interact with Ganache

From rbachwiki
Revision as of 23:04, 13 March 2018 by Bacchas (talk | contribs) (Created page with " ==Setting up Truffle to interact with Ganache GUI == Edit the truffle.js file. add: networks: { ganache: { host: "localhost", port: "7545", netork_id: "*" } } Go t...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Setting up Truffle to interact with Ganache GUI

Edit the truffle.js file. add:

networks: {
ganache: {
 host: "localhost",
 port: "7545",
 netork_id: "*"
}
}

Go to the project directory in terminal. we have to tell truffle to migrate the contract to the ganache network

truffle migrate --compile-all --reset --network ganache