This project aims to create a decentralized caching system using blockchain and Web3 technology.
- Backend: Node.js, TypeScript, Express
- Blockchain: Ethereum Smart Contracts
- Frontend: (To be decided)
- Clone the repo
git clone https://github.com/nbursa/distributed-cache-on-blockhain.git
- Navigate to the backend directory
cd src/backend
- Install NPM packages
npm install
- Start Ganache CLI to run a local Ethereum node
ganache-cli
- Run the backend server
npm run dev
Access the current Ethereum block number at http://localhost:3001/block-number
.
-
Open your terminal or command prompt.
-
Navigate to the directory where you want to create your Truffle project. Use the
cd
command to change directories. For example:cd src/blockchain/
-
Run the following command to initialize a new Truffle project:
npx truffle init
This command tells Truffle to create a new project in the current directory. It sets up the basic project structure with directories like
contracts
,migrations
, andtest
. -
Truffle will generate the project structure, and you'll see output indicating that it has created the necessary directories and files.
Starting unbox... ================= ? Please give us a few seconds ? Successfully created an empty project. ? Would you like to install OpenZeppelin contracts in your project? No / Yes ? Would you like to install OpenZeppelin test helper contracts in your project? No / Yes ? Would you like to install truffle-hdwallet-provider to deploy to a remote network? No / Yes
-
Your Truffle project is now initialized, and you can start adding smart contracts, migrations, and tests to it.
You can navigate into the project directory and proceed with your smart contract development and deployment using Truffle.
This project is licensed under the MIT License - see the LICENSE file for details.