migrate to ccs-nest
The server side is responsible for
- synchronizing event data on the chain
- performing some complex calculations
- sending transactions with admin signatures
- Provide data interface for front-end
- Manage some business data that does not need to be on the chain
- copy .cdc files from cadence folder
rsync -av --progress ../cadence/ cadence/ --exclude .git/ --exclude tests/ - launch postgres
docker run --name postgres -e POSTGRES_PASSWORD=password -e POSTGRES_DB=ccs -p 5432:5432 -d postgres - run
cd src/prisma && cp .env.example .envthen modify .env to connect postgres npx prisma migrate dev --name initialto generate prisma client files- launch a redis
docker run --name redis -p 6379:6379 -d redisatredis://127.0.0.1:6379
- in ccs-dappstarter folder, use
yarn devrun Flow environment - use
npx prisma migrate resetto initiate postgres (if need) - when Flow environment prepared, use
yarn devin ccs-server to launch server - use
npx prisma studioto check database in GUI (if need) - use
npx kill-port 7001to close server (if need)
test ORM with yarn test:db
- run redis, postgres and nginx containers in docker
- use
npx prisma migrate resetto initiate postgres (if need) - config flow config at
src/config/config.testnet.ts - use
yarn testnetto launch server - use
npx prisma studioto check database in GUI (if need) - use
npx kill-port 7001to close server (if need)