A backend (kinda REST-based) express.js based service for use with Movie bucketlist frontend. Connects to a MySQL Database filled with a list of movies and provides several endpoints for retrieving data from the databse.
Written by Sebastian Stampfel ([email protected]), December 2020
This is meant to run as a docker container, therefore the docker files in this repo. Hence a simple
$ docker-compose run -d
should suffice.
A sample MySQL-Table can be found in res/movies.sql
. Also, prior to running do not forget to
$ cp config-sample.js config.js
and edit the configuration to contain your database settings.
If you want to manually run this application, perform the following steps:
$ npm install
$ node app.js
Gets the full list of movies from the database.
Gets a random (unwatched) movie from the database.
Gets a specific movie from the database.
Gets a movie by rid (random-id) from the database.
Retrieves a list of all (un)watched movies from the db.
Toggles the watched state of a specific movie.
This list is meant to be given out as small sheets of paper, each one with a movie on it. One of those sheets is menat to be drawn and the movie drawn is then meant to be marked as watched in the application by its RID written on the paper after the movie title. This makes the sheets of paper look nicer than just having a single-digit ID written onto it.