expressjs / serve-static

Serve static files
MIT License
1.4k stars 228 forks source link

Single file serve? #89

Closed iBicha closed 6 years ago

iBicha commented 7 years ago

Would a shortcut to res.sendFile make sense to be added to serve-static?

i would say

//serving just my index file
router.get('/',  express.static(path.join(__dirname, 'public', 'index.html')));

Makes a lot of sense. Any thoughts?

dougwilson commented 7 years ago

Hm, yea, that can make sense, especially if it's just a small addition to this module.

iBicha commented 6 years ago

Will close for now. Feel free to reopen if still relevent.