A small simple shopping cart application built with the express framework. It focuses mainly on the functionalities surrounding managing a cart for a user.
Build a small shopping cart application. Assume that there is a list of products in a category (eg. food or clothing) which contain a set of standard attributes (sku, selling price, stock level, expiration date etc.) which a user can add to, remove from and edit inside a cart.
- Language - Typescript
- Framework - Express
- ORM - TypeORM
- Database - MYSQL
- Test kit - Jest, Supertest
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
-
Pull/download code from repository
-
Run the command
$ npm install
- Copy .env.example file to .env, and fill in the necessary information.
- Create a database with a name of your choice on your local mysql instance, set the name in your env file.
- Run project using this command, this also initialise tables
$ npm instal
- Run database seeder using this command
$ npm run migrate:up
- Go over Postman Docs for more information about services postmandocs
The application uses Jest and Supertest for testing. An in-memory sqlite database is used as the database of choice for testing activities. Run the command below.
$ npm test
- Nana Hawau Adeku - @Nana-Hawau