Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quick start #10

Open
lucrezia93 opened this issue Jul 18, 2017 · 3 comments
Open

Quick start #10

lucrezia93 opened this issue Jul 18, 2017 · 3 comments

Comments

@lucrezia93
Copy link

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.

@lhartikk
Copy link
Owner

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.

@Alizeinalzadeh
Copy link

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?

@goldexone
Copy link

goldexone commented Dec 3, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants