Open ricricucit opened 9 years ago
Probably Magento isn't configured correctly — try accessing api/products
directly and see what message is returned.
i get a 404...i think that me and the "Getting Started" are missing some steps...
actually no. It's all good. going to
http://my.store/api/public/products
i see me an empty Array printed (which i guess it's fine since i didn't yet add any product)
Now the problem is:
1) Open example.com/Magento-on-Angular/store/ in your browser; 2) You may need to update the base_url in Magento Admin > Configuration > Web if you did a fresh installation of Magento.
1) it just shows me "Welcome to socket.io." 2) I'm not familiar with Magento but there i'm setting "http://example.com/Magento-on-Angular/store/" (obviously making that match with the right URL) ...is that the right BASE_URL? (doing that: i still get "Welcome to socket.io.")
same problem. In my magento install (maybe on all newer install?) rest api need "accept: application/json" header, or it will return a 500 status code. substituting line 24 with
request({url:url,headers:{"Accept": "application/json"}}, function (error, response, body) {
solved the issue for me, but you should debug your node server and see what's in the body and response var. Of course a status code check should be implemented in the server along with a correct error handling
@m3l7 Could you please open a pull request for this change?
I wanted to test Moa and everything went smooth until i've run this:
which generated this:
any idea why?
(note: running a Python simpleHTTPserver showed me the app, but gave me obvious "Access-Control-Allow-Origin" errors)