Skip to content

Instantly share code, notes, and snippets.

@luiszugasti
Last active June 28, 2020 17:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save luiszugasti/20fe3558a220f5640dbb8b67192c575c to your computer and use it in GitHub Desktop.
Save luiszugasti/20fe3558a220f5640dbb8b67192c575c to your computer and use it in GitHub Desktop.
const express = require('express');
const path = require('path');
const app = express();
const port = 3000;
const os = require('os');
// D:\\Videos\\
const dir = process.env.VIDEO;
// SERVE RIGHT TO YOUR DOOR
app.use(express.static(dir));
app.get('/', (res, req) => res.send("Server is up and running."));
app.listen(port, () => console.log(`Example application listening at http://localhost:${port}`));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment