Last active
August 7, 2017 18:20
-
-
Save ddialar/aae7782d29db68e70e5d3f61693d08df to your computer and use it in GitHub Desktop.
log4js - basic server configuration
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
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