kalisio/feathers-distributed

Does not work with REST client

Closed this issue · 4 comments

Steps to reproduce

Change test setup to use REST client instead of socket clients

Expected behavior

Everything should work fine

Actual behavior

Most tests fail with the following error: GeneralError: A data object must be provided to the 'create' method

System configuration

Tell us about the applicable parts of your setup.

Module versions (especially the part that's not working): 0.4

NodeJS version: 8.16

Operating System: windows

Have you tested this with Postman?

I've created 2 services service-a and service-b.
It works correctly with app.service(service-b.todo) from service-a.
But if I use Postman http://service-a/todo, this does not work. The page does not exist.

Note: I use the v4, but it's seems to work.

I've tried looking over the code, but I cant seem to find the error.
Do you have a clue ?

That's exactly what some tests are supposed todo like https://github.com/kalisio/feathers-distributed/blob/master/test/index.test.js#L474, ie access a service in one app which is located in another one. REST should be similar to what POSTMAN does. If you think there is a problem please open an issue with a detailed description of your setup and your code, thanks.

By the way could it be related to #35 ? You can check what is going on with DEBUG=feathers-distributed*.

I'm gonna go some more investigation, and get back to you 😊
I have no idea about #35, it looks like it is working in my tests