diff --git a/README.MD b/README.MD index 76b6ed3..8f1b51f 100644 --- a/README.MD +++ b/README.MD @@ -13,34 +13,41 @@ This web system enables users to log into the system and view videos using the b - Easy to install - Easily expandable and hackable to fit your needs +# Installation +## NPM Dependencies -npm dependencies ```bash -npm install express --save -npm install fs --save -npm install express-session --save -npm install whiskers --save +npm install ``` -Dependencies +## System Dependencies ```bash $apt-get install ffmpeg ``` +## Running -Codacs which don't work -H.265 -MPEG-2 Video AC-3 (ATSC A/52) +To deploy this you will want to run this behind a reverse NGINX proxy to +allow you to encrypt all of the network traffic. +There are plenty of tutorials on how to do this online with let's encrypt. -Video but no audio -H.264 audio:AC-3 (ATSC A/52) -H.264 (Main Profile) AC-3 (ATSC A/52) +To run this program either run `run.sh` or execute `node server.js`. This +by default will run on port 5000 -- you are able to change this in `conf.json`. +To make this easier for you in the long run, I usually run my node applications +as [systemd](https://freedesktop.org/wiki/Software/systemd/) services. -Audio but no video: -H.265 (Main 10 Profile) MPEG-4 AAC +The default config provided in this project has the default username of admin and password +of admin. +You will want create a new admin user and remove the default one once you +get this running. +# Contributing -just work: -H.264 (High Profile), MPEG-4 AAC +This was largely just a weekend hack for me. +This currently fits most of my needs and is *functional*. +If you find any bugs, feel free to open a issue and I will get around to looking at it. +I am always looking for people to contribute to my projects. +If you have an idea for an enhancement for this project feel free to hack away and issue a PR. +Contact me using the form on my [blog](jrtechs.net) or by opening a github issue if you have any questions regarding the code or how to use this project. diff --git a/conf.json b/conf.json index 55b4069..66e3d2a 100644 --- a/conf.json +++ b/conf.json @@ -4,11 +4,14 @@ "users": [ { "username": "admin", - "password": "7756626c84c37f25e29f48c10729e6d2947850f4030cb5811b297115bc0bcfe5", + "password": "f7c45eebc3710734d512d44e0fcbc9c075ee984eb0c1a2a4d89cd8dd38f608f7", "id": 1, - "salt": "62f28310e1f0f2bdabeb6de07bb3943a980f4a9c6332c53c0a2a8eb684adcd4d", + "salt": "9162ff07513960398251d4a797e863b60d64048a6c550343cd56210dcea932ec", "admin": true, - "api": "8ecf65673b6cb6673555f1213f08a3abf9264294b6d3d98a27f2745f0aaf1cbe" + "api": "e8d4fd1267e14660bde678be259b86af413be4aca234bafa773a7c9fd535e9e2" } - ] + ], + "serverURL": "http://localhost:5000", + "privateDir": "/home/jeff/private/videos", + "publicDir": "/home/jeff/public/videos" } \ No newline at end of file diff --git a/package.json b/package.json index d568e42..008e5de 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "HomeBrewPlex", - "version": "0.1.0", + "name": "Home Brew Plex", + "version": "1.0.0", "description": "Light weight alternative for Plex", "main": "server.js", "scripts": { @@ -18,8 +18,11 @@ }, "homepage": "https://github.com/jrtechs/HomeBrewPlex#readme", "dependencies": { + "crypto": "^1.0.1", "download-file": "^0.1.5", + "express": "^4.16.4", "express-session": "^1.15.6", + "filepreview": "^1.0.16", "fs": "0.0.2", "path": "^0.12.7", "url": "^0.11.0", diff --git a/run.sh b/run.sh new file mode 100644 index 0000000..0a20f82 --- /dev/null +++ b/run.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +# run - this script enters a infinite loop to ensure that the website does not go down if it +# hits any unexpected error that crashes Nodejs +# +# 2/13/18 Jeffery Russell + +while true +do node server.js +done \ No newline at end of file