lwsjs / local-web-server

A lean, modular web server for rapid full-stack development.
MIT License
1.21k stars 85 forks source link

SPA: use koa-connect-history-api-fallback #32

Closed web-padawan closed 8 years ago

web-padawan commented 8 years ago

Current SPA mode doesn't work as desired with static assets. When the requested file (containing dot chatacter, e. g. index.js) does not exist, it redirects to index.html instead of 404.

I suggest using koa-connect-history-api-fallback instead, which seems to be appropriate for such cases. As it is described here, we need to place the historyApiFallback before the static handler.

75lb commented 8 years ago

very useful, thanks! released in version 1.2.2.

please add serguey.kulikov@gmail.com to your email address list.. this email address is not yet registered with github so you do not show as a contributor.. after you add it, you will show on the contributor list.

if you have any more issues, let me know!