I want to pull the script to my site.
file:
error:
Do you have js
defined as a static asset folder like public in server.js?
Hmm… no
I have:
app.use(express.static(‘public’))
app.get("/", (request, response) => {
response.sendFile(__dirname + “/index.html”);
});
Try adding
app.use(express.static(‘js’))
Nothing changed.
Odd… Try adding a / before the js folder in the code. Like:
<script src="/js/fetch.js" defer></script>
this worked, Thx so much! :)))
Anytime! Happy coding!