A blockchain for studies purposes. (this is not a project ready to production, it's just to learn the basics blockchains concepts)
- nodejs
- a mongodb database
- Clone with git or download this repo;
git clone https://github.com/Bryant-Anjos/fatecoin.git
- In the project folder install the dependencies:
npm install
or
yarn install
-
Copy the
.env.example
that is in the root of this project and rename it to.env
; -
Change the
MONGO_URL
variable with your mongodb connection string.
npm run dev
or
yarn dev
You can use a browser or any http client to access the project routes. The routes are the following:
Base url: localhost:3333/chainparams
Route | Description |
---|---|
/difficulty |
get the current blockchain difficulty |
/isvalid |
verify if the blockchain is valid |
/latestblock |
get the latest block mined from the blockchain |
/mineblock |
mine a block |
/blockchain |
verify all blocks stored in the blockchain |