If you're using the http-server package from npmjs, there is a way to have a catch-all redirect to itself again for SPAs like Angular: https://www.npmjs.com/package/http-server#catch-all-redirect
http-server