Skip to content

daniilrobnikov/DevCamper

Repository files navigation

DevCamper

DevCamper is a bootcamp directory website. This project is a Back-End API

Documentation

Postman Documentation

Features

Environment Variables

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

Usage

Run App

# Run in development mode
npm run dev
# Run in production mode
npm start

Database Seeder

# Import sample data
node seeder -i
# Delete sample data
node seeder -d

API Reference

Get all bootcamps

  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 bootcamp

  GET /api/bootcamps/[id]
Parameter Type Description
id string Required. Id of bootcamp to fetch

Get bootcamps within a radius

  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

Upload photo for bootcamp

  PUT /api/v1/bootcamps/[id]/photo
Parameter Type Description
id string Required. Id of bootcamp to fetch
file multipart/form-data Required. Bootcamp photo

Disclaimer

This project is a part of a Node.js API course

About

Backend for DevCamper API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published