Bookstore Node/Express API
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Vic f5b75558c8 updated README.md 2 years ago
migrations added order_spec.ts 2 years ago
src linter + prettier 2 years ago
.gitignore updated packages 2 years ago
LICENSE.txt init commit 2 years ago
README.md updated README.md 2 years ago
database.json updated README.md 2 years ago
docker-compose.yml minor fix 2 years ago
jasmine.json added order_spec.ts 2 years ago
package.json added user model and users handler 2 years ago
tsconfig.json init commit 2 years ago
yarn.lock added user model and users handler 2 years ago

README.md

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 the following commands :

  • npm run down
  • npm run up

Availaible endpoints

  • Products :

    HTTP Verb Endpoint CRUD
    Get /products Index
    Get /products/:id Read
    Post /products Create ( Token )
    Put /products/:id Update ( Token )
    Delete /products/:id Delete ( Token )
  • Users :

    HTTP Verb Endpoint CRUD
    Get /users, Index ( Token )
    Get /users/:id Read ( Token )
    Post /users Create
    Put /users/auth Authenticate ( Token )
    Put /users/:id Update ( Token )
    Delete /users/:id Delete ( Token )
  • Orders

    HTTP Verb Endpoint CRUD
    Get /orders, Index ( Token )
    Get /orders/:id Read
    Post /orders Create
    Post /orders/:id/products Create ( Token )
    Delete /orders/:id/products Delete ( Token )

Built with

  • Typescript
  • Postgres
  • Node
  • Express
  • Dotenv
  • Db-migrate
  • Jsonwebtoken
  • Jasmine
  • Supertest

Author

Anis Benziane.