Skip to content

Instantly share code, notes, and snippets.

@jesse1981
Created March 11, 2024 00:29
Show Gist options
  • Save jesse1981/667d570b8287161bbdc20a4c1722e5ee to your computer and use it in GitHub Desktop.
Save jesse1981/667d570b8287161bbdc20a4c1722e5ee to your computer and use it in GitHub Desktop.
const express = require('express');
const app = express();
var index = require('./routes/index');
app.use(express.json());
app.use(express.urlencoded({ extended: true }));
app.use('/', index);
// start the server
var server = app.listen(8081, function () {
var host = server.address().address
var port = server.address().port
console.log("My Project | listening at http://%s:%s", host, port)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment