- Install Node.js
- Install PostgreSQL
- Install GIT (optional)
Note: if you don't want to install GIT, you need to download the repository as a ZIP file.
Clone the repository: git clone https://github.com/luchoweb/movies-app.git
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
- Run PostgreSQL and create a database using the same
PGDATABASE
name setting on your .env file. - Move to
/api
folder and run:npm install
- Run migrations:
npx sequelize db:migrate
- Run seeders:
npx sequelize db:seed:all
- Run the server:
npm start
Note: for more information about Sequelize CLI, visit this link
Create a .env
file in the /frontend
folder with the following information:
VITE_API_MOVIES = 'http://localhost:5000/api/movies'
- Move to
/frontend
folder and run:npm install
- Run the frontend:
npm run dev
- Production? Sure:
npm run build
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.