alexandrevicenzi / gistfy

Code once, share everywhere.
MIT License
65 stars 22 forks source link

Use express's built in static middleware to serve static files #1

Closed giodamelio closed 10 years ago

giodamelio commented 10 years ago

It is a bit safer to let express handle the static files. I also moved the static files into their own directory to keep anyone from requesting any other files.

alexandrevicenzi commented 10 years ago

index.html need to be moved to /static too, I think. Could you fix this?

giodamelio commented 10 years ago

Isn't index.html an example?

alexandrevicenzi commented 10 years ago

Well, it will be my main page, for now it's just an example. But if I try to access / it will break, because now files are at /static.

giodamelio commented 10 years ago

Ahh, I get it. One sec.

giodamelio commented 10 years ago

There you go.

alexandrevicenzi commented 10 years ago

Thanks.