Skip to content

Latest commit

 

History

History
62 lines (49 loc) · 1.54 KB

README.md

File metadata and controls

62 lines (49 loc) · 1.54 KB

App Logo

Museum Backend ⚡

CST2-Backend is the backend API for the Museum database frontend.

Using ExpressJS the API is using the Restful API standard.

Installation/Startup guide 🔨

Node version requirement

version >= 14.17.6
  1. Install packages
npm install
  1. Environmental variables
  • create a '.env' file in the source directory
# located in ./.env
# env format

HOST = 'MYSQL-HOST'
SQLUSER = 'MYSQL-USER'
PASSWORD = 'MYSQL-PASSWORD'
DATABASE = 'MYSQL-DB'
PORT = 'OPTIONAL-DEV-PORT-HERE (Remove line if production)'
TOKEN_SECRET = 'JWT-SECRET-HERE'

Secret tokens can be generated with the node hash function below:

require('crypto').randomBytes(64).toString('hex')
  1. Start Application
  • To start as developer (Uses nodemon)
npm run start:dev
  • Production
npm start

Technologies 📡

Front-end

React

Back-end

Express.js

Database

MySQL

Hosting

Azure Vercel