Skip to content

adsuzany/programming-challenge-april21

 
 

Repository files navigation

Programming Challenge

This challenge consists of developing a web application. Read the instructions to execute the solution.

By: Ada Suzany Franco de Araújo

Status

🚀 Ready 🚀

Getting Started

Prerequisites

Before start, you need to get installed those tools:

Executing

Fist you need to clone this repository with: git clone passing the url of this repository.

This project needs the following dependencies:

    "@fortawesome/fontawesome-free": "^5.15.3",
    "bootstrap": "^4.6.0",
    "ejs": "^3.1.6",
    "express": "^4.17.1",
    "express-ejs-layouts": "^2.5.0",
    "fast-csv": "^4.3.6",
    "jquery": "^3.6.0",
    "node-sass-middleware": "^0.11.0",
    "nodemon": "^2.0.7",
    "popper.js": "^1.16.1",
    "sequelize": "^6.6.2",
    "sequelize-cli": "^6.2.0",
    "sqlite3": "^5.0.2"
    

To install all them execute:

$ npm install

To run the application, execute:

$ npm start

Then, open your browser. The application is running at port 4444: http://localhost:4444/

API Requests

Endpoint:
GET http://localhost:4444/ 

To search for a movie:
GET http://localhost:4444/movie?year={year}&genre={genre} 

To rank movies:
GET http://localhost:4444/rating?num={number}

Database

SQLite is used, so the database is already populated and is the file: database.sqlite3. Which is ready to use.

To create and populate database we followed those steps:

  • Download files movie.csv and rating.csv from MovieLens and save at /dataset.

  • Execute the dataset treatment with:

    $ cd database

    $ python3 parser.py

    That will create genres.csv file and update movie.csv and rating.csv.

  • After create the migrations with npx sequelize db:migrate we needed to populate it, executing:

    $ node db.js

Technologies

The following technologies were used in this project:

Screenshots

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 42.3%
  • SCSS 36.1%
  • EJS 17.7%
  • Python 3.9%