Not being able to link other files, favicons etc when using express.js and node.js. The files are not public to the server. The console shows a 404 error when trying to link any other file.
In express and node, no file is public to the server unless you tell it to.
This is how –
app.use(express.static(__dirname + "dir"));
I recommend putting it all in a seperate folder and make the folder public.
Answered By – potato