Questions tagged [koa-static]

Static file serving middleware for koa with directory, rewrite and index support

Filter by
Sorted by
Tagged with
0 votes
0 answers
15 views

how to koa-mount multiple koa-static serve()

As a junior developer i'm facing a problem with koa-static. I have two graphiQL playground on /private and /admin. The documentation was koa-static serve() from an index.html file (same doc for both). ...
Yukie_ch's user avatar
0 votes
1 answer
228 views

How can I do a conditional router in Koa?

Currently, I am serving an HTML file and it works fine. (I am using koa-mount and koa-static to serve an index file under the docs directory.) app.use(mount('/docs', serve('docs'))) How can I do a ...
SPG's user avatar
  • 6,119
1 vote
0 answers
151 views

Serving front-end web-application from a type-script based KOA server cannot resolve CSS and JS files

I am trying to serve a front-end web-application from a type-script based KOA server. The index.html (HTML) renders fine from the public folder when i hit a full url till index.html (http://localhost:...
Tarun Patel's user avatar
0 votes
0 answers
335 views

How do I make a koa server work with a SPA that has react router

Ok, I have a project and in the past I made a koa SPA (using koa-static) because I needed it to run the page on heroku, the thing is that now I have react-router in my page and it works half fine. For ...
vycdev's user avatar
  • 29
1 vote
2 answers
390 views

Apidoc - Node.js doesn't show me @apiName

I have a problem with my documentation of API. I want to make documentation, but @apiName doesn't appear... I tried to add @appVersion, but it didn't work. This is my documentation /** * @api {post}...
David Kadlcek's user avatar
11 votes
2 answers
5k views

Why can't I serve static files from a Koa router?

Why in the following case does koa-static fail to work with koa-router? const Koa = require("koa") const serve = require("koa-static") const Router = require("koa-router") const app = new Koa() ...
ChaseMoskal's user avatar
  • 7,211