ER Diagram
A RESTful API for a simple online bookstore.
- Typescript
- NodeJS
- NestJS
- MySQL
- Sequelize ORM
- Redis
- Docker
- RESTful API built with NestJS
- Session authentication using Redis as session store
- Input validation
- Database transactions
- Database migrations using Sequelize
- Docker
- Typescript support
Click here for the API Documentation
Before proceeding, make sure you have the following installed:
Follow the instructions given below to get this project up and running on your local machine.
- Clone this repository by running
git clone git@github.com:georgeben/online-book-store.git
cd
online-book-store- Create a file in the project's root named .env and copy the content of .env.schema and paste it into .env. Fill in the appropriate values for any missing env.
- Run
docker-compose --env-file .env run api npm run db:init
to initialize the database - Run
docker-compose --env-file .env up -d
to start the application - Access the application at localhost:3000
# Install dependencies
$ npm install
# Start application
$ npm run start
# Start application in watch mode
$ npm run start:dev
# Initialize database
$ npm run db:init
# Run migrations
$ npm run migrate:up
# Run seeders
$ npm run db:seed
# unit tests
$ npm run test
# e2e tests
$ npm run test:e2e
# test coverage
$ npm run test:cov
- e2e tests
- pagination