Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Commit

Permalink
Proposed changes for demo server (#136)
Browse files Browse the repository at this point in the history
  • Loading branch information
wtrocki committed Sep 28, 2017
1 parent 76df319 commit fd8b942
Showing 1 changed file with 16 additions and 39 deletions.
55 changes: 16 additions & 39 deletions demo/server/README.md
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.

0 comments on commit fd8b942

Please sign in to comment.