New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EXTDIRECT_PREFIX question #4

Closed
whito opened this Issue Jun 19, 2013 · 3 comments

Comments

Projects
None yet
3 participants
@whito

whito commented Jun 19, 2013

I'm wondering what is the purpose of the prefix in the config.json file. I see that you can prefix your api's in the direct folder, but is this sort of thing needed? Hopefully you can clarify this as it isn't really mentioned in the docs.. thanks!

@jurisv

This comment has been minimized.

Show comment
Hide comment
@jurisv

jurisv Jun 19, 2013

Owner

Prefix is used to find particular classes, and group them. For example you might want 2 different sets, one DX, other ADMIN. This way api generator will know what to include in generated api response.

Owner

jurisv commented Jun 19, 2013

Prefix is used to find particular classes, and group them. For example you might want 2 different sets, one DX, other ADMIN. This way api generator will know what to include in generated api response.

@jurisv jurisv closed this Jun 19, 2013

@vencooin

This comment has been minimized.

Show comment
Hide comment
@vencooin

vencooin Aug 14, 2013

I have my webserver running on port 8000 and node on 8080. I have the following error when the browser make an attempts to make a call. can you please help with this issue.

Request URL:http://localhost:8000/direct?_dc=1376512013826
Request Method:POST
Status Code:404 Not Found
Request Headersview source
Accept:/
Accept-Encoding:gzip,deflate,sdch
Accept-Language:en-US,en;q=0.8
Connection:keep-alive
Content-Length:73
Content-Type:application/json
Host:localhost:8000
Origin:http://localhost:8000
Referer:http://localhost:8000/sencha_touch_direct/public/touch_workspace/touchApp/
User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36
X-Requested-With:XMLHttpRequest
Query String Parametersview sourceview URL encoded
_dc:1376512013826
Request Payloadview source
{action:DXServerDate, method:now, data:null, type:rpc, tid:1}
action: "DXServerDate"
data: null
method: "now"
tid: 1
type: "rpc"
Response Headersview source
Accept-Ranges:bytes
Connection:Keep-Alive
Content-Language:en
Content-Type:text/html; charset=utf-8
Date:Wed, 14 Aug 2013 20:26:53 GMT
Keep-Alive:timeout=5, max=21
Server:Apache/2.4.4 (Win32) OpenSSL/0.9.8y PHP/5.4.16
Transfer-Encoding:chunked
Vary:accept-language,accept-charset

Also in general working with node and webserver. I have the following issue when the browser attempts to make a call to node.
XMLHttpRequest cannot load http://localhost:8000/?_dc=1376516126544. Origin http://localhost:8000 is not allowed by Access-Control-Allow-Origin. How do you address these issues.

Appreciate your help with this request.

Thanks, Venkat

vencooin commented Aug 14, 2013

I have my webserver running on port 8000 and node on 8080. I have the following error when the browser make an attempts to make a call. can you please help with this issue.

Request URL:http://localhost:8000/direct?_dc=1376512013826
Request Method:POST
Status Code:404 Not Found
Request Headersview source
Accept:/
Accept-Encoding:gzip,deflate,sdch
Accept-Language:en-US,en;q=0.8
Connection:keep-alive
Content-Length:73
Content-Type:application/json
Host:localhost:8000
Origin:http://localhost:8000
Referer:http://localhost:8000/sencha_touch_direct/public/touch_workspace/touchApp/
User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36
X-Requested-With:XMLHttpRequest
Query String Parametersview sourceview URL encoded
_dc:1376512013826
Request Payloadview source
{action:DXServerDate, method:now, data:null, type:rpc, tid:1}
action: "DXServerDate"
data: null
method: "now"
tid: 1
type: "rpc"
Response Headersview source
Accept-Ranges:bytes
Connection:Keep-Alive
Content-Language:en
Content-Type:text/html; charset=utf-8
Date:Wed, 14 Aug 2013 20:26:53 GMT
Keep-Alive:timeout=5, max=21
Server:Apache/2.4.4 (Win32) OpenSSL/0.9.8y PHP/5.4.16
Transfer-Encoding:chunked
Vary:accept-language,accept-charset

Also in general working with node and webserver. I have the following issue when the browser attempts to make a call to node.
XMLHttpRequest cannot load http://localhost:8000/?_dc=1376516126544. Origin http://localhost:8000 is not allowed by Access-Control-Allow-Origin. How do you address these issues.

Appreciate your help with this request.

Thanks, Venkat

@jurisv

This comment has been minimized.

Show comment
Hide comment
@jurisv

jurisv Aug 16, 2013

Owner

Venkat,
You are running in to CORS. More info: http://en.wikipedia.org/wiki/Cross-origin_resource_sharing
Simplest solution, is to add header: Access-Control-Allow-Origin: * -> res.header('Access-Control-Allow-Origin', '*'); as part of the response.

Owner

jurisv commented Aug 16, 2013

Venkat,
You are running in to CORS. More info: http://en.wikipedia.org/wiki/Cross-origin_resource_sharing
Simplest solution, is to add header: Access-Control-Allow-Origin: * -> res.header('Access-Control-Allow-Origin', '*'); as part of the response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment