You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I love this project.
One thing I can't figure out though is how to (in addition to javascript routes) also serve image files. The router doesn't seem to recognize them. Maybe I'm doing something wrong but I can't find anything in the documentation about it. Is this supported?
Thanks.
For reference I'm using this basic setup:
import https from 'https'
import { initFileRouter } from 'node-file-router'
const useFileRouter = await initFileRouter({
baseDir: 'src/routes'
})
async function handleRequest (req, res) {
await useFileRouter(req, res)
}
https.createServer(options, handleRequest).listen(env.PORT)
The text was updated successfully, but these errors were encountered:
Static files are not part of the current functionality yet. However, I might have an idea of how it's possible to use them :) I'll figure out a solution and get back to you this week.
Hi, I love this project.
One thing I can't figure out though is how to (in addition to javascript routes) also serve image files. The router doesn't seem to recognize them. Maybe I'm doing something wrong but I can't find anything in the documentation about it. Is this supported?
Thanks.
For reference I'm using this basic setup:
The text was updated successfully, but these errors were encountered: