766 B
766 B
Backend Service
Configuration
Create database postgresql with name koperasi
Go to services/backend directory
Instalation dependencies
npm install
Copy .env.example to .env
cp .env.example .env
Set your database configuration in .env
generate secret key for JWT_SECRET with command
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
Set contractABI.json with contract abi after compile contract
set PRIVATE_KEY=" " with private key wallet blockchain
Set CONTRACT_ADDRESS=" " with contract address after deploy contract
Run project
Migration database
npm run migrate:fresh
Seed fake data
npm run db:seed
Run project
npm run dev