Skip to content

cherryblued/mini-blockchain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ”— Mini Blockchain with NodeJS & MongoDB

Node.js MongoDB TypeScript


βš™οΈ Tech Stack

  • Express.js – API
  • Mongoose.js – ODM Library for MongoDB
  • TypeScript – Type-safety
  • Swagger – API Documentation

πŸš€ Features

  • Genesis Block: Creates the first block in the blockchain.
  • Add Block: Add new blocks to the blockchain.
  • Get Chain: Get all blocks from the blockchain stored in the Mongo database.
  • Validate Chain: Verify the integrity of the blockchain by checking that each block hash is correct and that the previous hash matches the current block.

πŸ“¦ Installation

git clone https://github.com/luna-zx/mini-blockchain.git
cd mini-blockchain
npm i
npm run build

πŸ§ͺ Set Environment Variables

MONGO_URL = # your MongoDB connection url
PORT = # your API port

▢️ Start App

npm start

πŸ“ƒ Testing

After starting the app, go to API docs (swagger) at: http://localhost:<YOUR_API_PORT>/swagger

About

πŸ”—πŸ”‘ Easy blockchain written in Node.js (Typescript)

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors