Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Yeoman backbonejs with pushstate causing issues with grunt-contrib-connect

I have a backbonejs application in my yeoman dev environment. My application uses pushstate, however this causes the connect server to issue 404s when the page is reloaded (via live reload) or when I try to directly access a url. This is somewhat annoying right now, as I have pushstate support working under an nginx proxy, but I would like to have this ability in my dev environment too.

like image 478
Diarmuid Bourke Avatar asked May 13 '13 10:05

Diarmuid Bourke


1 Answers

I've been having a similar issue with my AngularJS application and Yeoman. I used the 'connect-modrewrite' middleware to rewrite all URLS that weren't pointing to specific resources. Found the solution here => http://ericduran.io/2013/05/31/angular-html5Mode-with-yeoman/

like image 158
Jason Sich Avatar answered Oct 31 '22 19:10

Jason Sich