koperasi/services/backend
2025-08-08 14:12:40 +07:00
..
assets initial commit 2025-08-08 14:12:40 +07:00
src initial commit 2025-08-08 14:12:40 +07:00
.env.example initial commit 2025-08-08 14:12:40 +07:00
.gitignore initial commit 2025-08-08 14:12:40 +07:00
contractABI.json initial commit 2025-08-08 14:12:40 +07:00
drizzle.config.ts initial commit 2025-08-08 14:12:40 +07:00
express.d.ts initial commit 2025-08-08 14:12:40 +07:00
LICENSE initial commit 2025-08-08 14:12:40 +07:00
package-lock.json initial commit 2025-08-08 14:12:40 +07:00
package.json initial commit 2025-08-08 14:12:40 +07:00
README.md initial commit 2025-08-08 14:12:40 +07:00
tsconfig.json initial commit 2025-08-08 14:12:40 +07:00

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