osman-butt / nemlig-project-backend

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Nemlig.com - 2nd semester project

Group project made by Benjamin, Gustav, Osman & Sham.

Deployed app

Create a MySQL database

  • Download the database backup file from here
  • Open up a terminal and type (when prompted, type in your password)
mysql -u [USERNAME] -p 
  • Create a new database
CREATE DATABASE nemlig_db;
  • Open up a new terminal and import the data:
mysqldump -u [USERNAME] -p nemlig_db < PATH_TO_FILE/BACKUP_FILE_NAME.sql

Installation

  • Fork the repository by clicking the "Fork" button in the top right corner of the GitHub page.

or

  • Clone the repository to your local machine using the following command in your terminal:
git clone https://github.com/osman-butt/nemlig-project-backend.git
  • Install dependencies
npm install
  • Create a .env file and paste the following
DATABASE_URL="mysql://[mysql_user]:[mysql_password]@localhost:3306/nemlig_db"
NODE_ENV="dev"
ACCESS_TOKEN_SECRET=
REFRESH_TOKEN_SECRET=
  • To generate new access and refresh tokens run the following command in the terminal
node
require("crypto").randomBytes(64).toString("hex")
  • Start up the backend server
npm start

Installation guide to the frontend can be found here

About


Languages

Language:JavaScript 100.0%