Skip to content

Museum database backend Restful API built using ExpressJS

Notifications You must be signed in to change notification settings

Junnyyy/CST2-Backend

Repository files navigation

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

About

Museum database backend Restful API built using ExpressJS

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published