I was able to get the CSS loaded on the initial page of the get, but when I use a button to submit data using POST, The post works, but the CSS fails to load and the screen is just plain with post info. here is some info below
app.use(express.static(__dirname + "/public"));
app.get('/', (req,res)=>{
res.sendFile(__dirname + "/index.html")
})
The HTML
<form action="/" method="post">
<input type="text" name="n1" placeholder="First Number">
<input type="text" name="n2" placeholder="Second Number">
<button type="submit" name="submit">Calculate</button>
</form>
The post
app.post("/",function(req,res){
var num1 = Number(req.body.n1);
var num2 = Number(req.body.n2);
var result = num1 + num2;
res.send("The result is " + result);
})
Page loads background color fine, but when I hit the calculate button is when CSS doesn't load. Just wondering what else I'd need to do to make CSS appear everywhere?