naivechain icon indicating copy to clipboard operation
naivechain copied to clipboard

Quick start

Open lucrezia93 opened this issue 7 years ago • 3 comments

Hi Lauri, I didn't understand how to execute this part (on PowerShell):

Quick start (set up two connected nodes and mine 1 block)

npm install

HTTP_PORT=3001 P2P_PORT=6001 npm start

HTTP_PORT=3002 P2P_PORT=6002 PEERS=ws://localhost:6001 npm start

Could you give me some informations more?

Thank you.

lucrezia93 avatar Jul 18 '17 07:07 lucrezia93

Hi

You will need to have nodejs and npm installed in order to run the naivechain.

After that you can start up a node(s) with the specified commands. The commands sets some environment variables for the node in a linux environment. If you use windows you may have to use some other format to feed the environment variables.

lhartikk avatar Jul 19 '17 19:07 lhartikk

Hi I am trying to test your blockchain, when i use http://localhost:3001/blocks in browser it shows the genesis block to me. but how can i add new block with my own data? i use http://localhost:3001/mineBlock but i got this: Cannot GET /mineBlock can you help me to fix this?

Alizeinalzadeh avatar Oct 18 '17 06:10 Alizeinalzadeh

Hi You must use in the command prompt the command CURL as indicated in the README. md (no in browser). And then in windows you must also give the command CURL in this different format for naivechain to interpret json without error: CURL -H "Content-type: application/json" --data "{\"data\":\"Some data to the first block\"}" http://localhost:3001/mineBlock

I hope I was helpful

goldexone avatar Dec 03 '17 00:12 goldexone