updated README.md
This commit is contained in:
parent
94664e7c5c
commit
877aa4a227
53
README.md
53
README.md
@ -1,3 +1,56 @@
|
|||||||
# Shelf Project
|
# 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.
|
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.
|
||||||
|
Loading…
Reference in New Issue
Block a user