Help me to Code to make automatic Code

I want to make automatic send file in file area
I really don’t know how to say

Mainly i am doing like this to all files
app.get("/assets/css/main.css", function(request, response) {
response.sendFile(__dirname + “/assets/css/main.css”);

So Now i want to make this files to go to automatically to the file website
Like: htpps://

This wanted to do automatically without the above Code

Hi SudhanPlayz!

If you look in ~hello-express’s server.js, there’s a line like this:


That means “everything in the public directory, just serve it as a file” - I think that’s what you want.

Hope this helps,


1 Like

@Johnicholas Not working