I'm trying to make a Sencha Touch App.
I have my UI written in Sencha Touch 2.
My REST APIs are written using NodeJs, ExpressJs with database as MongoDB.
Tested the REST APIs. They work fine in REST Client.
I run Sencha Touch app from cmd line in localhost:4000
*sencha web -p 4000*
I run NodeJs in localhost:3000
*var app = express(); app.listen(3000);*
Problem is, Im unable to send Ajax requests form client, getting error "No 'Access-Control-Allow-Origin' header"
Question:
1) Is it better to use different port and enable CORS only for localhost:3000?
2) How do I run Sencha Touch UI and NodeJs in same port to avoid CORS?