- Clone the repository
- Install dependencies:
npm install
- Create a
.env
file based on.env.example
- Run the database setup:
node ./db/setupdb.js
- Start the server:
npm start
POST /api/v1/accounts/register
: Register a new userPOST /api/v1/accounts/login
: Log in a user
GET /api/v1/products
: Get all productsGET /api/v1/products/:id
: Get a product by IDPOST /api/v1/products
: Create a new product (Admin only)PUT /api/v1/products
: Update a product (Admin only)DELETE /api/v1/products/:id
: Delete a product (Admin only)