Skip to content

Configuring Client → Web API → In Memory

Aaron Hanusa edited this page Mar 11, 2019 · 11 revisions

Client → Web API → In Memory

archlessmongo

In this scenario, the client consumes business services that are injected with data proxies that use HTTP to communicate with the Web API application. In turn, the Web API application uses business services that are injected with data proxies that communicate with in-memory data stores.

To configure the react client to consume http data proxies that communicate with the Web API, open businessLogic.js and follow these steps:

1.) Locate and comment the following line:

// configureInMemory();

2.) Locate and uncomment the following line:

configureHttp();

To configure the server to consume in-memory data proxies, open wireUpRoutes.js and follow these steps:

1.) Locate and uncomment the following line:

var proxyFactory = require('./data_proxies/in-memory/inMemoryDataProxyFactory');

2.) Locate and comment the following line:

// var proxyFactory = require('./data_proxies/mongo/mongoDataProxyFactory');

3.) Restart the application to ensure that the new proxies are consumed.