This repository has been archived by the owner on Apr 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Proposed changes for demo server (#136)
- Loading branch information
Showing
1 changed file
with
16 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,26 @@ | ||
# RainCatcher Cloud Demo application | ||
# RainCatcher Cloud Application | ||
|
||
Reference/demo implementation of the cloud application of a RainCatcher project. | ||
Reference implementation of the cloud application of a RainCatcher project. | ||
|
||
## Running | ||
> Note: This project is part of the RainCatcher solution. | ||
Please refer to RainCatcher documentation for more information how to run this project. | ||
|
||
Cloud application can be launched using | ||
## Documentation | ||
|
||
npm run start | ||
Please refer to official RainCatcher documentation: | ||
http://raincatcher.feedhenry.io/docs | ||
|
||
If you wish to run cloud application along with other demo applications please execute this command on top level application.Application was generated from [base application](../../examples/base) template | ||
## Source code | ||
|
||
## Debugging | ||
### Active development version | ||
|
||
Execute | ||
This version is used by RainCatcher developers and contains only TypeScript source code. | ||
https://github.com/feedhenry-raincatcher/raincatcher-core/blob/master/demo/server/ | ||
|
||
grunt debug | ||
### Active release version | ||
|
||
When process start you can connect to it using ide of your choice. | ||
This version contains all resources including javascript and other build artifacts | ||
https://github.com/feedhenry-raincatcher/raincatcher-server | ||
|
||
|
||
## Prerequisites | ||
|
||
- mongodb installed and running on port 27017 | ||
URL controlled by `process.env.MONGO_CONNECTION_URL` and `config-{env}.json` file. | ||
- redis installed and running on port 6379 | ||
URL controlled by `process.env.REDIS_CONNECTION_URL` and `config-{env}.json` file. | ||
|
||
## Configuration | ||
|
||
Demo offers different configuration profiles depending on where application will be deployed. | ||
|
||
- config-dev.js (for developer/local setup - used by default) | ||
- config-prod.js (for production uses) | ||
|
||
Profiles can be changed using `process.env.CONFIG_PROFILE` variable. | ||
For example: | ||
``` | ||
// use production profile. | ||
process.env.CONFIG_PROFILE === 'prod' | ||
// it will load config-prod.js file in top level application | ||
``` | ||
|
||
### Configuring custom query parameters for mobile clients | ||
|
||
Mobile clients based on the sync framework might not require to receive all WorkOrders in order to operate. | ||
|
||
To save on local memory usage, data traffic and improve performance, additional filters can be added to limit those. | ||
|
||
In this sample implementation, WorkOrders that are in a complete state stop being sent to mobile clients after two days of their completion. This can be configured via the `sync.daysToExcludeCompleteWorkorders` configuration key. It illustrates a way to include a relatively complex MongoDB query filter into the chain that is used by the list handler for the sync framework. | ||
|