I have a local Nodejs server running on port 5000.
I use Sencha Architect and I want to load the API with the name "getUsers" from my Nodejs server.
Here's my model:
Ext.define('Hivemind.model.MyModel', {
extend: 'Ext.data.Model',
requires: [
'Ext.data.field.Field',
'Ext.data.proxy.Rest'
],
fields: [
{
name: 'id'
},
{
name: 'name'
}
],
proxy: {
type: 'rest',
url: 'http://localhost:5000/getUsers'
}
});
Note that "http://localhost:5000/getUsers" is also accessible simply by the browser
But it gives me the following error:
Please make sure that the URL you set for your proxy is either local, or similar to the URL you set in your projects settings.
If you plan to use a different domain, please use a JsonP proxy.
If that matters, the project folder is saved somewhere on the Desktop, and the Nodejs Server files are stored on a different location