This is a simple API for a shop application.
- User
- Product
- ProductImage
- users.json
- products.json
- product_images.json
-
POST /api/products
-
GET /api/products
-
GET /api/products/:idOrSlug
-
GET /api/products/all/:term
-
PATCH /api/products/:id
-
DELETE /api/products/:id
-
POST /api/auth/register
-
POST /api/auth/login
-
GET /api/auth/check-status
- Next.js
- Prisma
- Postgres
- Clone the repository
git clone https://github.com/jamj2000/nxapi-shop.git- Install dependencies
cd nxapi-shop
npm install- Configure DATABASE_URL in .env
cp .env.example .envEdit .env file and add your DATABASE_URL
- Set up the database
npx prisma db push- Run the seed
npm run seed- Start the development server
npm run devnpm run build
npm run startThis project was inspired by nest-teslo-shop developed by Fernando Herrera using the NestJS framework.
My project uses NextJS instead of NestJS.😉
This project is licensed under the MIT License - see the LICENSE file for details.
