Skip to content

Latest commit

 

History

History
58 lines (47 loc) · 2.23 KB

README.md

File metadata and controls

58 lines (47 loc) · 2.23 KB

Lumina

Display movies using the OMDB api and add/remove favourites if authenticated

View lumina.pdf for detailed description and screenshots 📄

File Structure

Name Description
lumina-test Frontend of the application using Angular 8
backend Backend of the application using Node.js

Setup Instructions

Clone (or download) this repository and follow the steps below after navigating into folder Lumina (cloned) to setup the local backend and frontend servers:-

Pre-requisites

Install Node.js - https://nodejs.org/en/
Install Angular CLI - https://cli.angular.io/
Set up MySQL server - https://dev.mysql.com/downloads/mysql/ or follow below
Homebrew for macOS - https://brew.sh/

Setup MySQL

Install using brew
brew install mysql

Start mysql
brew services start mysql

Set username and password as 'root' and 'password' as used in Node.js connection
mysqladmin -u root password 'password'

Enter mysql and input password 'password' or as set when prompted
mysql -u root -p

Create database luminaTest (accessed by Node.js backend)
CREATE DATABASE luminaTest

Make sure the SQL server is running before starting Node.js server

Setup Node.js Backend

Navigate to backend directory
cd backend

Install dependencies
npm install

Start server or optionally, start server using nodemon to watch file for changes
node index.js OR npm run start:server

Create table users by navigating to the below URL on a browser (make a GET request)
http://localhost:3000/createtable?tableName=users

Insert intial users (GET request)
http://localhost:3000/insertInitial

Make sure the Node.js server is running before starting Angular server

Setup Angular frontend

Navigate to lumina-test directory
cd lumina-test

Install dependencies
npm install

Start server and open in browser
ng serve --open

All done! 🎉