Created
June 15, 2020 09:10
-
-
Save kianaditya/fb1308ade893b54f9a4bdc20aa8f2bc3 to your computer and use it in GitHub Desktop.
express medium article part 1
This file contains hidden or 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
require('dotenv').config() | |
const express = require('express') | |
const logger = require('morgan') | |
const app = express() | |
const PORT = process.env.PORT | |
app.use(logger('dev')) | |
app.use(express.json()) //http://expressjs.com/en/api.html#express.json | |
app.use(express.urlencoded({ extended: false })) //http://expressjs.com/en/5x/api.html#express.urlencoded | |
app.listen(PORT, () => { | |
console.info(`App listening on port ${PORT}`) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment