-
Copy the .env.example file to .env;
-
Run
docker compose up
to start on development mode with Nodemon;Note: The app will start on port 8000.
-
Run
docker compose run api yarn test
to run test suites with code coverage; -
Run
docker compose run api yarn typecheck
to check Typescript; -
Run
docker compose run api yarn seeder
to populate with one cart;
- Using Express to routing listened connections;
- Swagger to documentation;
- Using Typescript to enforce type checking;
- Nodemon with ts-node to watch file changes and compile;
- Using dotenv to configure environment variables;
- Using tsconfig-paths to configure
paths
correctly to Nodemon;
- MongoDB as selected database;
- mongo-express, a web-based MongoDB admin interface to show collections;
- Jest test framework with ts-jest;
- Supertest for API test calls;
To run the environment and create data:
docker compose up
docker compose run yarn seeder
Enjoy using localhost:8000/api-docs
-
Open localhost:8000 and see API Running;
-
Go to the localhost:8000/carts link and list the carts;
-
Get the ID and replace on localhost:8000/carts/CARTID;