0

I am trying to make a Hangman game using only backbone and making some API calls. Is there a way to use only Backbone and render the app on localhost? I have a router set up, but I am not sure how to render views on localhost without having a backend server.

Thanks in advance.

xyzzz
  • 1,463
  • 5
  • 18
  • 28
  • Depending on how you've done it you may be able to just open the html file in the browser and have it work. We'd need more information to help further. Are you using webpack or anything to handle multiple source files? – david Feb 22 '16 at 21:51
  • I am able to open the html file directly in the browser. I am not using webpack. I am just trying to render views with a backend server. I was following `http://stackoverflow.com/questions/14454201/running-an-backbone-app-as-an-independent-js-application-routes-not-working`. But, in spite of running the server, i am not able to render the views as I want. – xyzzz Feb 22 '16 at 21:58
  • Views just manipulate the DOM, there's no dependency on a server. I'm not sure what your problem is, please give us more info. – Eric Guan Feb 23 '16 at 00:20
  • @rond I guess it depends on many things... like how you're loading templates, data etc... you'll have to provide such info. Loading from file system will have many security issues. you might be able to get away with it by disabling web security for development purpose. Check the console and network tab for errors – T J Feb 23 '16 at 04:40

0 Answers0