app.js
413 Bytes
const express = require("express");
var app = express();
http = require('http').createServer(app);
port = 23023;
app.use(express.static(__dirname + "/views"));
const routes = require("./routes/");
const errorController = require("./routes/errorController")
app.use(routes)
app.use(errorController.pageNotFoundError);
var server = http.listen(port, function(){
console.log(`http://localhost:${port}`);
})