Tell us what’s happening:
okay why is not working it should be receiving the data from the public folder
Your code so far
let express = require(‘express’);
let app = express();
console.log(“Hello World”);
app.get(“/”, function(req,res){
res.sendFile(__dirname + “/views/index.html”);
res.sendFile(__dirname + “/public/style.css”);
});
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36
Challenge: Basic Node and Express - Serve Static Assets
Link to the challenge: