Skip to content

Universal-Access-Control/back-end

Repository files navigation

Access Control API Service

Before start working on this project, make sure you installed Nodejs and MongoDB in your machine and MQTT Broker service are available.

This project used Apollo Graphql to create a api server. For more information, check this link.

Run Project

For running this project, follow the steps below:

  • Clone repository

  • Go to project directory

    • cd back-end
  • Set Environment Variables

    • Create .env file
    • Copy content of .env.example file to .env file
    • Set variables ( Default values are in .env.default ).
  • Install Dependencies

    • npm install
  • Start Server

    • npm start

* MongoDB and MQTT Broker are required. Make sure this services are available.

Available Scripts

In the project directory, you can run:

npm install

Install dependencies of the project.
After you clone the repository, you have to install dependencies by running this command.

npm start

Runs the app in the development mode.
The server will start at http://localhost:4000.

Open http://localhost:4000/graphql to view Graphql Playground in your browser.

The server will reload automatically if you make edits.