- Production:
https://figureoneskates-backend.mailfaruqi.com
- Local:
http://localhost:3000
Products:
Endpoint | HTTP | Description | Done |
---|---|---|---|
/products |
GET |
Get all products | ✅ |
/products/:slug |
GET |
Get product by slug | ✅ |
/products |
POST |
Add new product | |
/products |
DELETE |
Delete all products | |
/products/:slug |
DELETE |
Delete product by slug | |
/products/:slug |
PUT |
Update product by slug |
Auth:
Endpoint | HTTP | Description | Permission |
---|---|---|---|
/users |
GET |
Get all users | Public |
/users/:username |
GET |
Public | |
/auth/register |
POST |
Public | |
/auth/login |
POST |
Public | |
/auth/me |
GET |
Authenticated | |
/auth/logout |
POST |
Authenticated |
Cart:
Endpoint | HTTP | Description | Permission |
---|---|---|---|
/cart |
GET |
Authenticated | |
/cart/items |
POST |
Authenticated | |
/cart/items/:id |
DELETE |
Authenticated | |
/cart/items/:id |
PUT |
Authenticated |
To install dependencies:
bun install
You already have a .gitignore file. Don't forget to add .env
in it to not commit any private information.
Next steps:
- Set the required variables in the
.env
file, form the.env.example
- Run
docker compose up -d
to run database in local Docker container - Run
bun prisma migrate deploy
to apply migration - Run
bun prisma db seed
to seed initial data - Run
bun prisma generate
to generate the Prisma Client. You can then start querying your database.
To run:
bun dev
To run:
bun start