Skip to content

Nanahawau/Shopping-Cart

Repository files navigation

A Simple Shopping Cart

A small simple shopping cart application built with the express framework. It focuses mainly on the functionalities surrounding managing a cart for a user.

Task

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.

Technologies

  • Language - Typescript
  • Framework - Express
  • ORM - TypeORM
  • Database - MYSQL
  • Test kit - Jest, Supertest

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

  1. Pull/download code from repository

  2. Run the command

   $ npm install
  1. Copy .env.example file to .env, and fill in the necessary information.
  2. Create a database with a name of your choice on your local mysql instance, set the name in your env file.
  3. Run project using this command, this also initialise tables
   $ npm instal
  1. Run database seeder using this command
   $ npm run migrate:up
  1. Go over Postman Docs for more information about services postmandocs

Test

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

Authors

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages