Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //require dependencies
- const express = require('express'),
- const app = express(),
- const router = express.Router();
- const port = process.env.PORT || 4200,
- //define a route, usually this would be a bunch of routes imported from another file
- router.get('/', function (req, res, next) {
- res.send('Welcome to the Kushy API');
- });
- //add routes to express app
- routes(app);
- //start Express server on defined port
- app.listen(port);
- //log to console to let us know it's working
- console.log('Kushy API server started on: ' + port);
Add Comment
Please, Sign In to add comment