Skip to content

Instantly share code, notes, and snippets.

@mesutbeysulen
Created November 25, 2019 09:26
Show Gist options
  • Save mesutbeysulen/5c7a7f020342c6ac11229f176f598149 to your computer and use it in GitHub Desktop.
Save mesutbeysulen/5c7a7f020342c6ac11229f176f598149 to your computer and use it in GitHub Desktop.
'use strict'
const PORT = 300;
var express = require('express')
var bodyParser = require('body-parser')
var app = express();
var routes = require('./routes/index')
var publicDir = (__dirname + '/public');
app.use(express.static(publicDir));
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: true }));
app.use('/', routes);
//server.listen(80, 'localhost');
app.listen(PORT, () => { console.log("MY RESTAURANT API running") });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment