Serving up static files

I am trying to serve up the static files but nothing seems to be working. I even followed the examples that were shown through the hints.

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

console.log('hello world');

const absolutePath = __dirname + '/views/index.html';

app.use(express.static(__dirname + '/public/style.css'));

app.get('/', function(req, res){

I’m doing the coding challenge from this one I would appreciate the help, thank you.

According to docs:


and it should work.

That didn’t work. I tried it on Replit and on vs code. What worked was app.use('/public', express.static('/public'));

I just tried and it works. Be sure not to have a /.