DevCamper is a bootcamp directory website. This project is a Back-End API
- Framework: Express.js
- Database: MongoDB
- Test API Platform: Postman
- Authentication: JSON Web Tokens
- Image Upload: express-fileupload
- Custom Database Seeder (bootcamps, courses, reviews & users)
- Advanced Query (pagination, filter, search feature, etc)
- Emailing Password Reset Token with nodemailer
- Security: Rate Limit, CORS, XSS, HPP, Helmet
- Geocoding: node-geocoder
- Custom Error Handling
To run this project, you will need to add the following environment variables to your config/config.env file
NODE_ENV
PORT
MONGO_URI
FILE_UPLOAD_PATH
MAX_FILE_UPLOAD
GEOCODER_PROVIDER
GEOCODER_API_KEY
JWT_SECRET
JWT_EXPIRE
JWT_COOKIE_EXPIRE
SMTP_HOST
SMTP_PORT
SMTP_EMAIL
SMTP_PASSWORD
FROM_EMAIL
FROM_NAME
# Run in development mode
npm run dev
# Run in production mode
npm start
# Import sample data
node seeder -i
# Delete sample data
node seeder -d
GET api/v1/bootcamps${query}
Parameter | Type | Description |
---|---|---|
api_key |
string |
Required. Your API key |
query |
string |
Filter response by key values from Bootcamps Schema f.e. ?name=Devworks Bootcamp |
GET /api/bootcamps/[id]
Parameter | Type | Description |
---|---|---|
id |
string |
Required. Id of bootcamp to fetch |
GET /api/v1/bootcamps/radius/[zipcode]/[distance]
Parameter | Type | Description |
---|---|---|
zipcode |
string |
Required. Zipcode as the center of a searching area |
distance |
string |
Required. Distance from zipcode position that defines bootcamps searching area |
PUT /api/v1/bootcamps/[id]/photo
Parameter | Type | Description |
---|---|---|
id |
string |
Required. Id of bootcamp to fetch |
file |
multipart/form-data |
Required. Bootcamp photo |
This project is a part of a Node.js API course