Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

serveStatic not work with Fastify #250

Open
lyquocnam opened this issue Nov 1, 2017 · 0 comments
Open

serveStatic not work with Fastify #250

lyquocnam opened this issue Nov 1, 2017 · 0 comments

Comments

@lyquocnam
Copy link

if i try to use:

fastify.use(require('lasso/middleware').serveStatic());

this error:

/Users/lynam/Documents/dev/marko/node_modules/lasso/middleware/serveStatic.js:47
        if (!path.startsWith(routePrefix) || (req.method !== 'GET' && req.method !== 'HEAD')) {
                 ^

TypeError: Cannot read property 'startsWith' of undefined
    at /Users/lynam/Documents/dev/marko/node_modules/lasso/middleware/serveStatic.js:47:18
    at Holder.done (/Users/lynam/Documents/dev/marko/node_modules/middie/middie.js:90:11)

and if not use, assets could not be found.
screen shot 2017-11-02 at 12 00 19 am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant