SubuKris
SubuKris

Reputation: 71

Using the http.path property in model defintion

The model I have created has this url: http://localhost:3000/api/Employees

Now if I set the http property like this: "http": {"path": "/foo/mypath"}

http://docs.strongloop.com/display/public/LB/Model+definition+JSON+file#ModeldefinitionJSONfile-Top-levelproperties

What will be the new url to access the model ? I tried various permutations and combinations none of which seem to work.

Upvotes: 0

Views: 333

Answers (1)

Miroslav Bajtoš
Miroslav Bajtoš

Reputation: 10785

At the moment, http paths must not start with a leading slash, see https://github.com/strongloop/loopback-datasource-juggler/pull/573

The following setting should work well

"http": {"path": "foo/mypath"}

URL:

/api/foo/mypath

Upvotes: 1

Related Questions