updated README.md
This commit is contained in:
parent
dee64d41c4
commit
f5b75558c8
69
README.md
69
README.md
@ -3,7 +3,6 @@
|
|||||||
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
|
# Installation
|
||||||
|
|
||||||
1 - Install packages dependencies. `npm install`
|
1 - Install packages dependencies. `npm install`
|
||||||
@ -12,52 +11,56 @@ An online storefront to showcase products. Users is able to browse an index of a
|
|||||||
4 - Run the database `npm run up`
|
4 - Run the database `npm run up`
|
||||||
5 - Launch the application `npm run start`
|
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`
|
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
|
# Availaible endpoints
|
||||||
|
|
||||||
- Products :
|
- Products :
|
||||||
|
|
||||||
- get `/products`, Index
|
| HTTP Verb | Endpoint | CRUD |
|
||||||
- get `/products/:id` Read
|
|:--------------:|:--------------------|:-----------------|
|
||||||
- post `/products` Create ( Token )
|
| Get | `/products` | Index |
|
||||||
- put `/products/:id` Update ( Token )
|
| Get | `/products/:id` | Read |
|
||||||
- delete `/products/:id` Delete ( Token )
|
| Post | `/products` | Create ( Token ) |
|
||||||
|
| Put | `/products/:id` | Update ( Token ) |
|
||||||
| HTTP Verb | Endpoint | CRUD |
|
| Delete | `/products/:id` | Delete ( Token ) |
|
||||||
|:-------------: |:-------------------:| -----------------:|
|
|
||||||
| get | `/products` | Index |
|
|
||||||
| get | `/products/:id` | Read |
|
|
||||||
| post | `/products` | Create ( Token ) |
|
|
||||||
| put | `/products/:id` | Update ( Token ) |
|
|
||||||
| delete | `/products/:id` | Delete ( Token ) |
|
|
||||||
|
|
||||||
- Users :
|
- Users :
|
||||||
|
|
||||||
- get `/users`, Index ( Token )
|
| HTTP Verb | Endpoint | CRUD |
|
||||||
- get `/users/:id` Read ( Token )
|
|:--------------:|:--------------------|:-----------------------|
|
||||||
- post `/users` Create
|
| Get | `/users`, | Index ( Token ) |
|
||||||
- post `/users/auth` Authenticate ( Token )
|
| Get | `/users/:id` | Read ( Token ) |
|
||||||
- put `/users/:id` Update ( Token )
|
| Post | `/users` | Create |
|
||||||
- delete `/users/:id` Delete ( Token )
|
| Put | `/users/auth` | Authenticate ( Token ) |
|
||||||
|
| Put | `/users/:id` | Update ( Token ) |
|
||||||
|
| Delete | `/users/:id` | Delete ( Token ) |
|
||||||
|
|
||||||
- Orders :
|
- 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 ) |
|
||||||
|
|
||||||
- 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
|
# Built with
|
||||||
|
|
||||||
- Typescript
|
- Typescript
|
||||||
- Postgres for the database
|
- Postgres
|
||||||
- Node/Express for the application logic
|
- Node
|
||||||
- Dotenv from npm for managing environment variables
|
- Express
|
||||||
- Db-migrate from npm for migrations
|
- Dotenv
|
||||||
- Jsonwebtoken from npm for working with JWTs
|
- Db-migrate
|
||||||
- Jasmine/Supertest from npm for testing
|
- Jsonwebtoken
|
||||||
|
- Jasmine
|
||||||
|
- Supertest
|
||||||
|
|
||||||
# Author
|
# Author
|
||||||
|
|
||||||
|
@ -4,13 +4,13 @@
|
|||||||
"host": "127.0.0.1",
|
"host": "127.0.0.1",
|
||||||
"database": "shelf",
|
"database": "shelf",
|
||||||
"user": "postgres",
|
"user": "postgres",
|
||||||
"password": "fredy123"
|
"password": "postgres"
|
||||||
},
|
},
|
||||||
"test": {
|
"test": {
|
||||||
"driver": "pg",
|
"driver": "pg",
|
||||||
"host": "127.0.0.1",
|
"host": "127.0.0.1",
|
||||||
"database": "shelf_test",
|
"database": "shelf_test",
|
||||||
"user": "postgres",
|
"user": "postgres",
|
||||||
"password": "fredy123"
|
"password": "postgres"
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user