A simple backend REST API for IMDb database built with Node.js, Express, Sequelize, PostgreSQL.
.env
file in the root directory of this package contains the connection string to the database:
DATABASE_URL="postgres://postgres:postgres@127.0.0.1:5432/demo?schema=imdb"
The connection string is of the form:
postgres://USERNAME:PASSWORD@SERVER:PORT/DATABASE_NAME?schema=SCHEMA
If you use your different PostgreSQL instance, then change this key accordingly.
The .env
file has the setting for Metis API:
METIS_API_KEY=YOUR_API_KEY
Replace this key accordingly if you want to use Metis with TestContainers. This is optional, the application will work without the key as well.
Run the command:
./start-service.sh
This will create the Docker container and start it.
If you want to remove the image after you're done, run this:
./remove-container.sh
This script will prune the images as well. It will ask for confirmation.
Make sure you have the Node.js installed (version 16+).
Run the build script:
./build-and-run.sh
Make sure you have the Node.js installed (version 16+).
Run the test script:
./test-with-external-dependencies.sh
Make sure you have the Node.js installed (version 16+).
Run the test script that will start the database and the Metis collector:
./test.sh
Fore more info visit our - Documentation