N
N
narem2020-01-15 10:23:50
Node.js
narem, 2020-01-15 10:23:50

How to change file location in express?

Writing

app.use(express.static(path.join(__dirname, 'public')));

What would the path be from the public, I connect the style
<link rel="stylesheet" type="text/css" href="stylesheet/style.css">

And for some reason he can't find it. What can be wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
ProAI, 2020-01-15
@ProAI

Should be connected like this

<link rel="stylesheet" type="text/css" href="/stylesheet/style.css">

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question