Skip to content

Instantly share code, notes, and snippets.

@JoeThunyathep
Created April 20, 2020 16:17
Show Gist options
  • Save JoeThunyathep/abfec35252c4d9df95bb09920a2f3de5 to your computer and use it in GitHub Desktop.
Save JoeThunyathep/abfec35252c4d9df95bb09920a2f3de5 to your computer and use it in GitHub Desktop.
Simple NodeJS server with Express framework
var express = require('express');
var compression = require('compression');
var app = express();
app.use(compression());
app.use(express.static('public'));
var server = app.listen('3000', '0.0.0.0', function () {
console.log('Application Running: http://localhost:%d', server.address().port);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment