/sebamaster-movie-backend

SEBAMaster Movie Backend Application

Primary LanguageJavaScriptMIT LicenseMIT

sebamaster-movie-backend application

sebamaster-movie-frontend application can be found here

Prerequisites

Both for the back end and front end application check

Just for the backend application:

Setup (before first run)

Go to your project root folder via command line

cd path/to/workspace/sebamaster-movie-backend

Install node dependencies

npm install

Set up your database

  • Create a new directory where your database will be stored (it's a good idea to separate data and business logic - the data directory should be on a different place than your app)
  • Start the database server
mongod --dbpath relative/path/to/database
  • Create all database schemes and import data to begin with
mongorestore dump/

Set the environment variables

This variables are based in your local configuration

export PORT=3000
export MONGODB_URI="mongodb://localhost:27017/moviedb"
export JWT_SECRET="very secret secret"

Start the project

Development environment

npm run devstart

Production environment

npm start