Bookstore Node/Express API
Go to file
2022-05-24 19:42:02 +02:00
migrations added order_spec.ts 2022-05-23 23:52:50 +02:00
src added orders_spec 2022-05-24 02:22:36 +02:00
.gitignore updated packages 2022-04-20 18:54:43 +02:00
database.json product tests fix 2022-05-19 03:25:20 +02:00
docker-compose.yml minor fix 2022-05-19 02:18:33 +02:00
jasmine.json added order_spec.ts 2022-05-23 23:52:50 +02:00
LICENSE.txt init commit 2022-04-19 16:47:00 +02:00
package.json added user model and users handler 2022-05-20 04:55:14 +02:00
README.md updated README.md 2022-05-24 19:42:02 +02:00
tsconfig.json init commit 2022-04-19 16:47:00 +02:00
yarn.lock added user model and users handler 2022-05-20 04:55:14 +02:00

Shelf Project

An online storefront to showcase products. Users is able to browse an index of all products, see the specifics of a single product, and add products to an order that they can view in a cart page.

Installation

1 - Install packages dependencies. npm install 2 - Inside shelf folder mount the database. docker compose up 3 - Run tests. npm run test 4 - Run the database npm run up 5 - Launch the application npm run start

Note : If needed you can reset the tables by closing the app and running npm run down, npm run up

Availaible endpoints

  • Products :

    get /products, Index get /products/:id Read post /products Create ( Token ) put /products/:id Update ( Token ) delete /products/:id Delete ( Token )

  • Users :

    get /users, Index ( Token ) get /users/:id Read ( Token ) post /users Create post /users/auth Authenticate ( Token ) put /users/:id Update ( Token ) delete /users/:id Delete ( Token )

  • Orders :

    get /orders, Index ( Token ) get /orders/:id Read ( Token ) post /orders Create post /orders/:id/products Authenticate ( Token ) delete /orders/:id/products Delete ( Token )

Built with

  • Typescript
  • Postgres for the database
  • Node/Express for the application logic
  • Dotenv from npm for managing environment variables
  • Db-migrate from npm for migrations
  • Jsonwebtoken from npm for working with JWTs
  • Jasmine/Supertest from npm for testing

Author

Anis Benziane.