Skip to content

eddybruv/BL-backend

Repository files navigation

BL-backend

Backend tasks(api) for Bridge Labs (live documentation)

⚡ Prerequisites

🔧 Setting up the Project

  1. Clone the repository in preferred directory on your computer

    git clone <project-url>
  2. Enter project directory

    cd BL-backend
  3. Install dependencies

    npm install
  4. Set up .env file

    touch .env
  5. Define project's required environment variables in .env file

    MONGODB_URL=<mongodb connection string>
    PORT=5000
    MAIL_EMAIL=<email, preferable gmail>
    MAIL_PASSWORD=<will have to do some extra setting up to get this ready>
    CLOUD_NAME=<cloudinary name>
    CLOUD_API_KEY=<cloudinary api keu>
    CLOUD_API_SECRET=<cloudinary api secret>
    JWT_SECRET=<jwt secret string>

    use this to set up mail password

🔮 Running the project

  1. Start the server

    nodemon server 

    Or

    node server

🙌 Done!

Notes

  • It'll be better to test the endpoints from an API platform like Postman or Insonmia. Using the swagger ui can cause uncontrolled errors for now and it'll run only when using a local server.

Releases

No releases published

Packages

No packages published