Advanced Management of Data Term Project WS21/22
A simple movie management system implemented in PostgreSQL with a Node.js frontend by Robert Schulz and Lucas Schmutzler.
- PostgreSQL
- Node.js
- A modern webbrowser
The server interacts with the PostgreSQL database and provides a REST API for the frontend.
-
Navigate to the servers' directory.
cd server
-
Install the Node.js dependencies.
npm install
-
Create or change the .env file with your database configuration. The file has to be placed inside the server's root dir. The REST API will listen on the
SERVER_PORT
on localhost.
# .env file
DATABASE_NAME="movie_management"
DATABASE_USER="postgres"
DATABASE_PASS="postgres"
DATABASE_HOST="127.0.0.1"
DATABASE_PORT="5432"
SERVER_PORT="5000"
- Launch the server using
node index.js
ornodemon run
The server will reply with 'Server has started on portSERVER_PORT
' it successfully launched.node index.js
The client acts as a simple frontend to interact with the database.
-
Navigate to the clients' directory.
cd client
-
Install the Node.js dependencies.
npm install
-
(Optional) Create or change the
.env
file with your server configuration. The file has to be placed inside the client's root dir. TheSERVER_PORT
specified for the client must match with theSERVER_PORT
specified for the server.
# .env file
SERVER_HOST="localhost"
SERVER_PORT="5000"
- Launch the client using
npm start
The frontend will be accessible from the browser athttp://localhost:3000/
.npm start