VideoPortal is a powerful video streaming system where users can watch many different movies, add comments and other stuff.
Use the package manager NPM to install all dependencies VideoPortal.
npm i
In the root project directory please create a .env
file.
# MongoDB settings
DB_URL = 'mongodb://localhost:27017'
DB_NAME = 'video-portal'
# Server settings
HTTP_PORT = '8080'
HTTP_HOST = 'localhost'
HTTP_ADDRESS = '0.0.0.0'
# Path to uploaded movies and posters
PATH_TO_IMAGE_DIRECTORY = 'uploads/images'
PATH_TO_MOVIE_DIRECTORY = 'uploads/movies'
# Credentials
POSTMAN_EMAIL = '[email protected]'
POSTMAN_PASSWORD = 'TempPass123!'
# Other
JWT2_PLUGIN_KEY = 'NeverShareYourSecret'
JSON_WEB_TOKEN_KEY = 'NeverShareYourSecret'
SERVER_ENCRYPTION_KEY = 'a184b630a935870144e75b7fffdb0701'
SERVER_ENCRYPTION_KEY_IV_LENGTH = '16'
ENCRYPT_DECRYPT_ALGORITHM = 'aes-256-cbc'
In the root project directory please create a directory with name "uploads". In this directory("uploads") create two additional directories "images" and "movies".
In this project are using Jest. Use the package manager NPM to run all test.
npm test
After completed all test, you can check video portal without any additional settings(without adding manually thousand the movies and after upload the theme directly to the server)
Use this link and download all needed posters and movies for the test.
Also, you will find the file "moviesForImport.json" in the root project directory. Please run the command above.
mongoimport --db video-portal --collection movies --file moviesForImport.json --jsonArray
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.