UNPKG

build-express-api

Version:

Command line interface for instantly building an express rest api

11 lines (8 loc) 385 B
var express = require('express'); var bodyParser = require('body-parser'); var app = express(); // Please do not remove this line, since CLI uses this line as guidance to import new controllers app.use(bodyParser.urlencoded({ extended: false })); app.use(bodyParser.json()); app.listen(process.env.PORT || 3000, () => { console.log('Server is running'); });