-
Notifications
You must be signed in to change notification settings - Fork 230
Issue Multiple Services usage #68
Comments
All you need to do is add multiple collections to the returned object in the createDb() {
let service1 = [];
let service2 = [];
return { service1, service1 }
} This gives you access to
I think some people get confused by the syntax in all the example(s) return { heroes } This is the same (shorthand) as return { heroes: heroes } So each property in the returned object is considered a collection. So if you have multiple collections, just add more properties. Each property is the collection URL. e.g. return {
heroes: heroes // app/heroes
crises: crises // app/crises
} Or the shorthand return { heroes, crises } |
The method I mentioned used to work earlier. Anyways, thanks :) |
This is a solution in case you're looking for one inMemoryDB to rule them all. any suggestions how to handle that? |
I have the the same problem. How to have multiple modules each with their own inMemoryDB. |
Any updates on this issue? |
When in-memory-web-api is used for multiple services like this, only the last service url(not checked with more than 3, so I dunno if "last" is always true) is available. I confirmed it by switching places of service1 and service2.
The text was updated successfully, but these errors were encountered: