https://the-goat-movie-app.onrender.com/
Title | Director | Year | Length | Country | Colour | Genre | 2022 | 2023 | Pos | ID | IMDB ID | Poster |
---|---|---|---|---|---|---|---|---|---|---|---|---|
Inception | Christopher Nolan | 2010 | 148 min | USA | Color | Sci-Fi | 9.5 | 9.7 | 1 | 123 | tt1375666 | https://image.tmdb.org/t/p/w500/qmDpIHrmpJINaRKAfWQfftjCdyi.jpg |
Parasite | Bong Joon Ho | 2019 | 132 min | South Korea | Color | Thriller | 9.3 | 9.6 | 2 | 124 | tt6751668 |
id | username | hashed_password | favorite_movie_id | wishlist |
---|---|---|---|---|
1 | amrali | amrali | 20 | 44, 45 |
const { Pool } = require('pg')
require('dotenv').config();
const pool = new Pool({
user: process.env.DB_USER,
password: process.env.DB_PASSWORD,
host: process.env.DB_HOST,
port: process.env.DB_PORT,
database: process.env.DB_DATABASE,
max: process.env.DB_MAX_CONNECTIONS,
idleTimeoutMillis: process.env.DB_IDLE_TIMEOUT,
connectionTimeoutMillis: process.env.DB_CONNECTION_TIMEOUT
});
pool.on('error', (err) => {
console.error('Unexpected error on idle client', err);
});
module.exports = pool;
=> GET {{baseURL}}/api/v1/movies?page=2&pageSize=10
=> GET {{baseURL}}/api/v1/user/profile/1
=> GET {{baseURL}}/api/v1/movies/imdb/tt21276878
$ cd deployments
## For The First Time to migrate the database run command
$ sh deploy sh
## In Case of your database already migrated You only need to
$ docker compose up -d