member-auth-service
The membership service backend of moneycom for both authentication and authorization. A set of REST-API powered by Pisma, PostgreSQL, Node.js and TypeScript. Will run on docker container and serverless cloud service.
Usage
Prisma
Create prisma schema & .env file in prisma folder
npx prisma init
Introspect database and generate data model in prisma schema
npx prisma introspect
Read prisma schema and generate prisma client
(This command needs to be executed every time the database is updated)
npx prisma generate
Initialize agent
Set agent role permission and products config in src/misc/agentConfig.ts
npm run generate-agent
Migrate users from firebase
This command will generate report in logs/
npm run migrate-user
Build TypeScript
Compile typescript files and output to dist/
npm run build-ts
Start Server after compiled
npm run serve
Development
Automatically restarting the node application when file changes in the directory are detected.
npm run watch-server