Comments (4)
what's the err.code you're getting? it should just return and fallback to the default koa 404
from static.
<-- GET /build.css
xxx GET /build.css 500 3ms -
Error: yield a function, promise, generator, array, or object
at next (/home/yoshua/Code/server/node_modules/koa/node_modules/co/index.js:109:12)
at Object.<anonymous> (/home/yoshua/Code/server/node_modules/koa/node_modules/co/index.js:50:5)
at next (/home/yoshua/Code/server/node_modules/koa/node_modules/co/index.js:93:21)
at Object.<anonymous> (/home/yoshua/Code/server/node_modules/koa/node_modules/co/index.js:50:5)
at Object.next (/home/yoshua/Code/server/node_modules/koa/node_modules/co/index.js:93:21)
at Object.<anonymous> (/home/yoshua/Code/server/node_modules/koa/node_modules/co/index.js:96:18)
at processImmediate [as _immediateCallback] (timers.js:374:17)
Requests to files that exist get handled without a problem though.
from static.
well there's an error right there :p that's what it's a 500
if you can repro with a little stand-alone script with just koa-static I can check it out
from static.
Turns out I was yielding the whole module. Woops :p
from static.
Related Issues (20)
- High severity security issue flagged by npm audit HOT 1
- Gzip has no effect. HOT 5
- Folders are not redirected if missing a slash at the end HOT 4
- possible vulnerabilities in koa-static
- please follow semver spec HOT 1
- when node version more than 10, it fails and alert some mistakes
- Add MIT License to root directory HOT 2
- start faild on node V11.12.0 HOT 1
- No support for Media Fragment URI HOT 1
- Migrate to @koa/static on NPM for consistency? HOT 1
- example not working HOT 1
- Static files not being served HOT 1
- Protected path with auth 🚧 -- Question HOT 1
- Should it have a folder view when it doesn't have an index.html? HOT 1
- Sending invalid gzip/br response HOT 1
- context.status is always 404 HOT 4
- Cannot serve .well-known (hidden) directory HOT 2
- David badge in README says "no longer available" HOT 1
- [feat] New Release HOT 5
- [feat] Disable caching for certain file types HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from static.