You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
536 B
JavaScript
22 lines
536 B
JavaScript
const express = require("express");
|
|
const path = require("path");
|
|
|
|
// Init App
|
|
const app = express();
|
|
|
|
// Static Files
|
|
app.use(express.static("public"));
|
|
app.use("/css", express.static(__dirname + "public/css "));
|
|
app.use("/js", express.static(__dirname + "public/js "));
|
|
app.use("/img", express.static(__dirname + "public/img "));
|
|
|
|
// Home Route
|
|
app.get("/", function (req, res) {
|
|
res.sendFile(__dirname + "/views/index.html");
|
|
});
|
|
|
|
// Start Server
|
|
app.listen(3001, function () {
|
|
console.log("Server started on port 3000...");
|
|
});
|