BassaDefinizione is a project created for my candidacy for Soluzioni Futura. In particular, the path I have chosen is Movie Review medium difficulty and skills of web applications development.
Through BassaDefinizione the user can:
- Look for a movie
- Like or dislike a movie
- Register and log
- Observe the user appreciation of a specific film
- Display the best rated films
Any information on any film is obtained from OMDb API, through a GET request in which an identification key must be specified
Open the terminal and clone this folder
$ git clone https://github.com/TheGodMorel/BassaDefinizione
Then install the NPM packages
$ npm install
To allow the creation and connection to the database is necessary:
- Create an AWS Account
- Create a new database using Amazon RDS
- Connect the RDS database to a local one
- The name must be the same
- Enter the RDS database endpoint as the local database Hostname
- Leave as port 3306
- Now that the database is ready, proceed to create cloned folder in another folder called private inside which the file will go .env
- In this file insert:
- OMDBKEY: unique key to access the OMDB API
- DB_HOST: endpoint of the RDS database
- DB_USER: name used in the database
- DB_PASSWORD: password used in the database
- DB_DATABASE: name of the database
- JWT_SECRETKEY: key to encrypt a JWT
- JWT_EXPIRES_IN: expiration time of a JWT
- COOKIE_EXPIRES_IN: expiration time of a cookie (used to save the JWT) For more information see this video ** Example ** of .env file:
OMDBKEY = keyOmdbApi DB_HOST = nomedatabase.codice.eu-central-1.rds.amazonaws.com DB_USER = admin DB_PASSWORD = password DB_DATABASE = nomedatabase JWT_SECRETKEY = secretkey JWT_EXPIRES_IN = 90d COOKIE_EXPIRES_IN = 90
Following these two simple steps the site will only be visible in the local IP 127.0.0.0
$ cd BassaDefinizione
$ node index.js
To have a global IP address instead, you need to:
- Create an EC2 instance
- This should be the final configuration of the instance:
- Move the file containing the SSH key into the folder BassaDefinizione
In the example the file is bassadefinizione.pem
- Connect the folder to the EC2 instance via PuTTY
- Run these commands to insert the BassaDefinizione folder into the instance:
Replace 0-0-0-0 with the instance's public IPv4 address
$ ssh ec2-user@ip-0-0-0-0 -i bassadefinizione.pem $ sudo su $ cd $ mkdir workspace $ cd workspace $ git clone https://github.com/TheGodMorel/BassaDefinizione $ cd BassaDefinizione $ node index.js
- The site is now visible to the public IPv4 address of the instance
- Change the password
- Advanced movie search
- Light mode
- Remove a rated film
Each new proposal is welcome. To do it you need to follow these steps:
- Fork the repo
- Create a secondary branch to the master
- Commit changes
- Push the commit
- Create a new Pull Request