This website is a movie database that allows users to browse, review, and add movies similar to IMDB.
- Built using Node.js, Express.js, Pug template engine, and MongoDB.
- run
npm install
to install the required dependencies - run
node data/database-initializer.js
to initialize database - run
node server.js
to start the server - open browser to localhost:3000 to start at the homepage
-
data folder
- A models folder that holds the files that define 5 different resources (users, people, movies, reviews, and notification) and the methods that can be used with them
- A movie data folder that holds the 4 supplied movie data files
- A data initilization script that populates the database with all the movies and people. It also adds 2 sample users and sample reviews for all movies.
-
routers folder
- 4 resource-specific routers that define the requests/responses for the methods of theses resources
-
views folder
- Contains all files pertaining to the front-end of the site, it includes:
- pages & partials: Pug templates for every page along with pug reusable code blocks.
- resources: Images, css styles, and scripts for the pages that are served as static files.
- Contains all files pertaining to the front-end of the site, it includes:
-
server.js: The entry point of the application.
- / (Home page)
- /login (Login page)
- /register (Registeration page)
- /contribute (Page for adding movies/people (only for contributing users))
- /profile (The profile page for the logged in user)
- /movies (Movie search page)
- /movies/:id (Movie page for movie with supplied id)
- /users/:id (User page for user with supplied id)
- /people/:id (Person page for person with supplied id)
- Movie data retreived from The Open Movie Database
- Logins for the sample users:
- username:
user1
, password:password
- username:
user2
, password:password
- username: