i have problem to run server [HELP] #4134
-
In the old ganache GUI and ganache CLI versions when I run the server everything works fine but with this version when I run the server I get a 404 error in the browser |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
@MohsenHaydari can you please provide some details of how you are starting the server, and how you are accessing ganache in the browser? If you just browse to http://127.0.0.1:8545, a 404 response is expected (although I'm unsure why this would be different with Ganache UI, or ganache-cli). In order to interact with Ganache, you'll need to use the JSON-RPC api (documented here: https://ethereum.org/en/developers/docs/apis/json-rpc/) For instance, you can use curl to check the latest block (taken from the JSON-RPC documentation above): curl -X POST --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":83}' Alternatively you can use a web3 library such as web3js, or ethersjs, which abstracts away the complexity of the JSON-RPC api. |
Beta Was this translation helpful? Give feedback.
-
ty for answer,My problem was solved, the problem was with Nginx location |
Beta Was this translation helpful? Give feedback.
ty for answer,My problem was solved, the problem was with Nginx location