Simple Express-based API for an eCommerce application.
Before running the application, make sure you have the following installed:
- Node.js
- npm
- MongoDB (and have it running)
- Clone the repository
git clone https://github.com/amirhosseinforouhar/ecommerce-api.git
cd ecommerce-api
- Install dependencies
npm install
- Create a
.env
file in the root directory and set the following environment variables
PORT=5000
MONGO_CONNECTION_URI=yourConnectionURI
SECRET_KEY=yourSecretKey
- Run the application
npm start
GET /api/v1/products?company=marcos&search=chair&sort=name&fields=name price
GET /api/v1/products/:id