Typescript application for simple Car Managment to mainly illustrate the usage of Moongose and Express server.
Project also illustartes usages of some npm packages
- ajv for validating json schemas
- swagger-jsdoc to provide OpenAPI 3.0 documentation for application
- swagger-ui-express to build a swagger UI to view/execute diffrent application API(s).
- eslint and prettier for linting support and auto-fix of linting indentation errors
- winston for creating a custom logger that uses winston logger.
- NodeJS version >=14.16.1 (LTS)
- Docker
Project comes with a docker-compose.yml file that contains 3 docker images
- car-managment, contains application.
- mongodb, to provide needed mongodb server.
- mongo-express, to provide a UI to view data in mongodb.
To build and start all containers
docker compose up -dTo access swaagger ui http://localhost:8080/docs/
To stop all containers
docker compose down- To set environment variables (i.e connection to MongoDB , port..etc) create a local .env file with below environment variables NODE_ENV=development LOG_LEVEL= info MONGO_USER= MONGO_PASSWORD= MONGO_PATH= PORT= API_KEYS=
- To build and start application for local development
npm install && npm run build && npm run start- To check for linting errors
npm run lint