1
0
mirror of https://github.com/devfake/flox.git synced 2024-11-14 22:22:39 +01:00
flox/flox-file-parser/server.js
Tim Meier 9d2362a178 Add File Parser
Add setup

More tests

Refactoring

Update readme

Update json format

Bump

Refactor

Add ext property for episodes

Update README.md

Add subtitles

Add code coverage

Add movies

Add tv and movie api request

Add env variables for root paths

Clean up

Merge all GET requests into one

Clean up
2017-02-13 21:17:25 +01:00

21 lines
598 B
JavaScript

const express = require("express")
const app = express()
const config = require("./config.js")
let port = config.app.port
let addr = config.app.host
if(!module.parent) { app.listen(port, addr) }
console.log("App is running on %s with port %d", addr, port)
console.log("TV_ROOT: ", process.env.TV_ROOT)
console.log("MOVIES_ROOT: ", process.env.MOVIES_ROOT)
if (!process.env.TV_ROOT || !process.env.MOVIES_ROOT) {
console.error("TV_ROOT and MOVIES_ROOT are both required to be set!")
if(process.env.NODE_ENV !== "test") process.exit(1)
}
require("./app/index.js")(app)
module.exports = app