NOTE : This command will create the DB, the tables, & build the app into JS code
In the project directory, you can run:
yarn build
yarn watch
yarn test
yarn dev
Will listen on port 3000
Route
: /usersAction
getHeader
Authorization for token -Value
for example (you can use the following string) : eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6IlRlc3RfVXNlciIsImlkIjo4NSwiaWF0IjoxNjYyNDc2MTUwfQ.IzhpuSRZowqLnaWe4ewBFn0n9-5oSveijRjwwP6HNqc
Route
: /users/:idAction
getHeader
Authorization for token -Value
for example (you can use the following string) : eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6IlRlc3RfVXNlciIsImlkIjo4NSwiaWF0IjoxNjYyNDc2MTUwfQ.IzhpuSRZowqLnaWe4ewBFn0n9-5oSveijRjwwP6HNqc
Route
: /usersAction
postBody
{ firstname: STRING, lastname: STRING, password: STRING }
Route
: /productsAction
get
Routes
: /products/key=:key&value=:Value for example : /products/key=id&value=1 Will show product with id = 1 /products/key=category&value=Kitchen Will show products with category = Kitchen /products/key=topProducts&value=5 Will show top 5 productsAction
get
Route
: /productsAction
postHeader
Authorization for token -Value
for example (you can use the following string) : eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6IlRlc3RfVXNlciIsImlkIjo4NSwiaWF0IjoxNjYyNDc2MTUwfQ.IzhpuSRZowqLnaWe4ewBFn0n9-5oSveijRjwwP6HNqcBody
{ name: STRING, price: NUMBER, category: STRING }
Route
: /products/addToCart=:orderId for example : products/addToCart=1 Will addAction
postHeader
Authorization for token -Value
for example (you can use the following string) : eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6IlRlc3RfVXNlciIsImlkIjo4NSwiaWF0IjoxNjYyNDc2MTUwfQ.IzhpuSRZowqLnaWe4ewBFn0n9-5oSveijRjwwP6HNqc
Route
: /ordersAction
getHeader
Authorization for token -Value
for example (you can use the following string) : eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6IlRlc3RfVXNlciIsImlkIjo4NSwiaWF0IjoxNjYyNDc2MTUwfQ.IzhpuSRZowqLnaWe4ewBFn0n9-5oSveijRjwwP6HNqc
Route
: /orders/currentAction
getHeader
Authorization for token -Value
for example (you can use the following string) : eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6IlRlc3RfVXNlciIsImlkIjo4NSwiaWF0IjoxNjYyNDc2MTUwfQ.IzhpuSRZowqLnaWe4ewBFn0n9-5oSveijRjwwP6HNqc
Route
: /ordersAction
postHeader
Authorization for token -Value
for example (you can use the following string) : eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6IlRlc3RfVXNlciIsImlkIjo4NSwiaWF0IjoxNjYyNDc2MTUwfQ.IzhpuSRZowqLnaWe4ewBFn0n9-5oSveijRjwwP6HNqc