Koa Push
Koa middleware for handling client-side pushstate routes. By default, a push state request is any GET
request that has no file extension and doesn't begin with /api/
.
Install
npm install koa-push
Usage
; app.usekoaPushState'/path/to/index.html';
Alternatively, you can pass your own check to determine if the request should be handled by the push state middleware:
; app.use koaPushState '/path/to/index.html', isPushStateRouteDefaultcontext || context.request.path.startsWith'/routes/' ;