Basic Node and Express - Serve Static Assets

Tell us what’s happening:
I don’t know why I keep failing this challenge I think I’ve tried everything I know

Your code so far

for my public/styles.css

app.use("/public", express.static(__dirname + "/public"));

for myApp.js

let express = require('express');
let app = express();

app.get("/", function (req, res) {
    res.sendFile(__dirname + "/views/index.html");    

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36

Challenge: Basic Node and Express - Serve Static Assets

Link to the challenge:

Do you have a link to your online IDE?

Yes I do

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.