heyhellomila / SOEN343

Anansi Library Management System - SOEN 343 Fall 2018

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CircleCI

SOEN343

Team Information

Anansi Library Management System

This web application uses the following technologies:

  • Express, a Node.js back-end framework
  • MySQL, a relational database

Installing Dependencies

Before starting, make sure you have working versions of Node (10.0.0+) and mySQL (5.7.23+). If not, please refer to the Wiki for installation details.

node --version
mysql --version

Necessary dependencies must be installed for both parts of the application. For the back-end, execute:

cd anansiBE/
npm install

For the front-end, execute:

cd anansiUi/
npm install

Database Setup

Create a config file inside anansiBE/ called .envwith the following contents, replacing <password> with a password of your choice:

MYSQL_PASSWORD="<password>"
SECRETKEY="<secret key>"
DATABASE_NAME="anansi_db"
TEST_DATABASE="anansi_db_test"

From the MySQL shell, and enter the following SQL statements, replacing <password> with the selected password above:

CREATE USER 'dbuser'@'localhost' IDENTIFIED BY '<password>';
GRANT ALL PRIVILEGES ON `anansi_db%`.* TO 'dbuser'@'localhost';
FLUSH PRIVILEGES;

To create the database and apply migrations, run the following commands:

#dev database
npm run migrate db:create anansi_db -- -e creation
npm run migrate up

#test database
npm run migrate db:create anansi_db_test
npm run test_migrate up

The first hardcoded administrator user is already included the migrations.

username password
tester test

Running the Back-end Server

To start the back-end server, use the following command from anansiBE/:

npm start

Running the Front-end Server

To start the front-end server, use the following command from anansiUI/:

npm start

The application will then be accessible at port 8080 exposed locally, i.e. http://localhost:8080. Note that both servers must be running as separate processes for the application to function.

About

Anansi Library Management System - SOEN 343 Fall 2018


Languages

Language:JavaScript 99.5%Language:CSS 0.5%