Developing with a local mock server in Idea/Webstorm

247 views
Skip to first unread message

Luca Molteni

unread,
Mar 7, 2013, 12:31:30 PM3/7/13
to ang...@googlegroups.com
Hello, I need some clarification on how to approach web development with angular.

After having watched the screencast, 


I decided to fire up IDEA, install the Live Edit plugin and start coding.

In my imagination, I would start by creating an application using mock data serialized into JSON string, after that define the REST interfaces of my service and then implement it. Soon I found out that it wasn't that simple.

It seems that the easiest way to set up the IDE is to use the live editing feature and the file on the local hard drive, with file:/// syntax. This indeed work well with local files, but when I tried to create some mock service (using resteasy simple embedded client, but this is a detail), it gives me an error with CORS:

XMLHttpRequest cannot load http://localhost:8081/service/users. Origin null is not allowed by Access-Control-Allow-Origin.

Is there an easy way to make the live edit plugin of webstorm work with a simple local server (I may use Jetty or AS 7 for that) so that my webpage doesn't make cross site request? It seems a little over complicated, maybe there is a better way to develop locally.

Thanks a lot, keep up the great work.


Reply all
Reply to author
Forward
0 new messages