Create a .env file in the backend directory with the following variables:
MONGO_URI=mongodb://localhost:27017/artmarketplace
JWT_SECRET=your_jwt_secret_key_here_make_it_long_and_secure
PORT=5000
- Install dependencies:
npm install- Start the development server:
npm run devPOST /api/auth/register- Register a new userPOST /api/auth/login- Login user
POST /api/artworks/create- Create new artwork (requires auth)GET /api/artworks- Get all artworksGET /api/artworks/:id- Get artwork by IDPUT /api/artworks/:id- Update artwork (requires auth)DELETE /api/artworks/:id- Delete artwork (requires auth)
GET /api/users/:id- Get user profile