UNPKG

panjareh

Version:

Panjareh using aparat and phoenix-video-player to play videos on desktops and tvs.

22 lines (17 loc) 542 B
"use strict"; var compression = require("compression"); var path = require("path"); var express = require("express"); var app = express(); var DIST_DIR = path.join(__dirname, "../dist"); var PORT = process.env.PORT || 3000; //Serving the files on the dist folder // app.use(compression); app.use(express.static(DIST_DIR)); //Send index.html when the user access the web app.get("*", function (req, res) { res.sendFile(path.join(DIST_DIR, "index.html")); }); app.listen(PORT, () => { console.log(`server started on port ${PORT}`); });