Skip to content

Instantly share code, notes, and snippets.

@kutliev
Created February 11, 2018 19:53
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 kutliev/0afb1e5d5ef147be17f7d581f11ee85a to your computer and use it in GitHub Desktop.
Save kutliev/0afb1e5d5ef147be17f7d581f11ee85a to your computer and use it in GitHub Desktop.
Simple NodeJS server
// server.js
const express = require('express');
const app = express();
// Run the app by serving the static files
// in the dist directory
app.use(express.static(__dirname + '/dist'));
// Start the app by listening on the default
// Heroku port
app.listen(process.env.PORT || 5000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment