angularjs - Which npm web server can I use with url rewriting -
i making spa angularjs , need local web server supports rewrite url functionality. of requests /home
, /profile/1
, /products?id=12
should return index.html in root folder. tried http-server, local-web-server non of these include redirect functionality. guess superstatic should work, returns 404 error time reason
try expressjs
you can use like
app.route('/*') .get(function(req, res) { res.sendfile(path.resolve(app.get('apppath') + '/index.html')); });
you can checkout this generator
Comments
Post a Comment