The site is working ok. It is routing urls ok when i click on links or by using the .navigate() function.
But… if i write the URL in the browser’s url bar (tried with chrome / firefox) i get a response from the server: Cannot GET /route (i’m using express node.js server).
Example:
I have the site at localhost:3333, if i write localhost:3333/favorites i get this response: Cannot GET /favorites.
But if i click on a link that has an event handler that calls a .navigate() function the view is displayed and the url bar get’s updated to “localhost:3333/favorites”! Some idea?
I tried with: Backbone.history.start({pushState: true}) and Backbone.history.start()
This is as to be expected. Your server needs to support all the same routes and return the HTML/JS/etc regardless. Once the page has rendered backbone will register the route and render the appropriate view.