Skip to content

Instantly share code, notes, and snippets.

@ddialar
Last active August 7, 2017 18:20
Show Gist options
  • Save ddialar/aae7782d29db68e70e5d3f61693d08df to your computer and use it in GitHub Desktop.
Save ddialar/aae7782d29db68e70e5d3f61693d08df to your computer and use it in GitHub Desktop.
log4js - basic server configuration
import { serverConf } from './config';
import express from 'express';
import bodyParser from 'body-parser';
var app = express();
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: true }));
app.post(
'/signin',
(request, response) => {
response.json(request.body);
}
);
app.listen(
serverConf.port,
() => {
console.log(`Server running on port ${serverConf.port} ...`);
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment