$ git clone https://github.com/2gbeh/shopera.git
$ cd shopera
$ npm cache clean --force
$ npm install
$ npm run dev
Development: (client) https://localhost:3000/ (server) https://localhost:3000/api/
Production 🚀🚀🚀: (client) https://shopera.vercel.app/ (server) https://shopera.vercel.app/api/
Method | Endpoint | Query | Body | Summary |
---|---|---|---|---|
GET | /products | all (ASC order) | ||
GET | /products/[product_id] | one | ||
⭐ GET | /products/?like=[search] | x | search (product, brand or barcode) | |
⭐ GET | /products/validate-barcode/[barcode] | validate upc-12 barcode | ||
POST | /products | x | add | |
PATCH | /products/[product_id] | x | update | |
PUT | /products/[product_id] | x | replace | |
DELETE | /products/[product_id] | soft delete (trash) | ||
⭐ DELETE | /products/[product_id]/?undo=true | x | undo delete (restore) |
Method | Endpoint | Query | Body | Summary |
---|---|---|---|---|
GET | /brands | all (ASC order) | ||
GET | /brands/[brand_id] | one | ||
POST | /brands | x | add | |
PATCH | /brands/[brand_id] | x | update | |
PUT | /brands/[brand_id] | x | replace | |
DELETE | /brands/[brand_id] | soft delete (trash) | ||
⭐ DELETE | /brands/[brand_id]/?undo=true | x | undo delete (restore) |
Added the .env
file to .gitignore but it did not exclude it, I think it is related to Prisma ORM (not sure).