Skip to content

SeniorDesignGroup5/PowerPanel-Backend

production
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

PowerPanel-Backend

This is the PowerPanel Backend server code written in ExpressJS

Installation

Follow all the instructions below to be able to develop on a local machine. Without creating .env and the private/public key pair the server WILL NOT START.

  1. Ensure you have npm installed
  2. Clone repository into new folder
  3. In terminal / CMD run npm install
  4. Create a file in the root directory called .env. This is the configuration for this particular servers configuration. The structure is as follows:
APP=dev
PORT=3000

DB_HOST=sd5-backend.engr.uconn.edu
DB_PORT=3306
DB_NAME=sd5-dev
DB_USER=<USERNAME>
DB_PASSWORD=<PASSWORD>
  1. Generate a private and public key-pair, such as from http://travistidwell.com/jsencrypt/demo/, that is 512 bits. Copy the text from that site into files in the root directory, and name them <APP>-private.key and <APP>-public.key respectively depending on the value of set in the .env file from above. For example, my local development key pairs are dev-public.key, dev-private.key.

DO NOT COMMIT .env or any private/public key's to github! It could cause issues with deployment and leaves our database and authentication system vulnerable.

Development

When developing, ensure you are on a different branch (NOT working on production).

Once you have a local instance that seems ready to add to production, create a pull request.

About

A REST API designed to interface with the PowerPanel Frontend and product data

Resources

Stars

Watchers

Forks

Releases

No releases published