Created
April 20, 2020 16:17
-
-
Save JoeThunyathep/abfec35252c4d9df95bb09920a2f3de5 to your computer and use it in GitHub Desktop.
Simple NodeJS server with Express framework
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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