Skip to content

Movies App - React + Node

Notifications You must be signed in to change notification settings

luchoweb/movies-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Movies App

Prerequisites

Note: if you don't want to install GIT, you need to download the repository as a ZIP file.


Clone

Clone the repository: git clone https://github.com/luchoweb/movies-app.git


API .Env

Create a .env file in the /api folder with the following information:

PORT = 5000

API_URL = 'https://www.omdbapi.com'
API_KEY = abc123de45

PGHOST = 'localhost'
PGUSER = 'luchoweb'
PGDATABASE = 'luchoweb'
PGPASSWORD = 'my4w350m3P45sw0rd'
PGPORT = 5432

API

  1. Run PostgreSQL and create a database using the same PGDATABASE name setting on your .env file.
  2. Move to /api folder and run: npm install
  3. Run migrations: npx sequelize db:migrate
  4. Run seeders: npx sequelize db:seed:all
  5. Run the server: npm start

Note: for more information about Sequelize CLI, visit this link


Frontend .Env

Create a .env file in the /frontend folder with the following information:

VITE_API_MOVIES = 'http://localhost:5000/api/movies'

Frontend

  1. Move to /frontend folder and run: npm install
  2. Run the frontend: npm run dev
  3. Production? Sure: npm run build

Tests

API : move to /api folder and run: npm test

Frontend: move to /frontend folder and run: npm test


That's it! Thanks for your time.

About

Movies App - React + Node

Resources

Stars

Watchers

Forks