git clone https://github.com/cpajuelodeveloper/simple-blockchains.git
^14.0
cp .env.orig .env
npm i
npm run test
npm run dev
Go to the browser and open localhost:3000 and the next urls.
- Request (application/json)
{ "message": "Hola Mundo" }
- Response 201 (application/json)
{ "payload": { "previusHash": "00d635c2fb2af1e39d7179c240444ee41b42392aa7a723576e83f79d4bf956dc", "message": "success", "nonce": 10, "hash": "00f312eed3c2a0e06905cc903aa3df4b4249dbcf7d64cfb9e9d10192ed3c02d8" }, "status": { "success": true, "code": 201, "message": "Operation successful" } }
- Request (application/json)
{ "message": "" }
- Response 400 (application/json)
{ "payload": null, "status": { "success": false, "message": "\"message\" is not allowed to be empty", "code": 400 } }