The project is a personal coding practice. Do NOT use it for production. It has a couple entities:
- GraphQL API endpoints
- GraphQL client web app
- Postman Test suite for the API endpoints
- Mongodb in a Docker container
- Spin up the DB
docker compose up
- Seed the DB
npm run seed
This project uses typescript everywhere. For GraphQL, it uses TypeGraph. For MongoDB, it uses TypeGoose. And everything else is the business logic in between. And they served by Express.js. For development, everything is run with ts-node
. Source code should be transplied if for production.
To start the dev server
npm run dev
The test script starts a server with the GraphQL API endpoints, and then uses newman.js to run Postman Collections. To run
npm run test
- Split APIs and web app into two servers but connected with docker compose.
- Use different databases for different entities or purposes.
- Add unit tests.
- Add linting.
- Add watching code change and auto restart server.