Skip to content

Instantly share code, notes, and snippets.

@vianhanif
Last active September 26, 2017 09:39
Show Gist options
  • Save vianhanif/89b70b7c35eee7ab51c5779a67eb9f3d to your computer and use it in GitHub Desktop.
Save vianhanif/89b70b7c35eee7ab51c5779a67eb9f3d to your computer and use it in GitHub Desktop.
sample server node.js
{
"name": "sha224_tester",
"version": "1.0.0",
"description": "",
"author": "Alvian Rahman Hanif",
"private": true,
"scripts": {
"postinstall": "npm install express"
}
}
var express = require('express');
var path = require('path');
var serveStatic = require('serve-static');
app = express();
app.use(serveStatic(__dirname));
var port = process.env.PORT || 5000;
app.listen(port);
console.log('server started '+ port);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment