Below, you'll find a simple express server I've put together:
// check out my basic Express server
var express = require("express");
var app = express();
var bodyparser = require("body-parser");
app.use("/public/", express.static("./public/"));
app.use("/node_modules/",express("./node_modules/"));
app.use(bodyparser.urlencoded({ extended: false }));
app.use(bodyparser.json());
//app.set
app.engine("html", require("express-art-template"));
app.get("/index", function (request, response) {
response.render("index.html");
});
app.listen(9000, function () {
console.log("server is running!!");
});
There's an issue with the CSS. Take a look at the image below for a better understanding: https://i.stack.imgur.com/eyWLm.png
Here's a glimpse of my index.html file:
https://i.stack.imgur.com/G0pLT.png
And this is what my resources folders look like:
https://i.stack.imgur.com/3pcfL.png
I've tried to solve the problem on my own but haven't had any luck so far. Can anyone help me fix it?