Skip to content

Instantly share code, notes, and snippets.

@slamidtfyn
Created June 25, 2020 09:13
Show Gist options
  • Save slamidtfyn/a2a68e670ddaab7cce254f46232fe1c5 to your computer and use it in GitHub Desktop.
Save slamidtfyn/a2a68e670ddaab7cce254f46232fe1c5 to your computer and use it in GitHub Desktop.
express.js - default setup
var PORT = process.env.PORT || 8072;
const express = require('express')
const app = express();
var bodyParser = require('body-parser');
var server = require('http').createServer(app);
app.use(bodyParser.json());
server.listen(PORT, () => console.log(`Server is listening on http://localhost:${PORT}`));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment