$ git clone https://github.com/2gbeh/shopera.git
$ cd shopera
$ npm cache clean --force
$ npm install
$ npm run dev
Development: (client) http://localhost:3000/ (server) http://localhost:3000/api/
Production 🚀🚀🚀: (client) http://shopera.vercel.app/ (server) http://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).