2013-11-13 15:21:58 +00:00
|
|
|
README: webapi-eca
|
|
|
|
|
==================
|
2013-11-28 18:14:05 +00:00
|
|
|
> A Modular ECA Engine Server which acts as a middleware between WebAPI's.
|
|
|
|
|
>
|
2014-04-05 00:05:51 +00:00
|
|
|
> The server is started through the [webapi-eca.js](webapi-eca.html) module by calling
|
|
|
|
|
> `node js/webapi-eca.js`.
|
2013-11-13 15:21:58 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
Getting started
|
|
|
|
|
---------------
|
2013-11-19 13:53:36 +00:00
|
|
|
|
2013-11-28 15:05:47 +00:00
|
|
|
**Prerequisites:**
|
|
|
|
|
|
|
|
|
|
- node.js (find it [here](http://nodejs.org/))
|
2013-12-10 22:44:28 +00:00
|
|
|
- *(optional) Pygments if you want to generate the doc:
|
|
|
|
|
`sudo apt-get install python-setuptools` and then
|
|
|
|
|
`sudo easy_install Pygments`*
|
2013-11-28 18:14:05 +00:00
|
|
|
- *(optional) [CoffeeScript](http://coffeescript.org/), if you want to develop
|
2013-12-10 22:44:28 +00:00
|
|
|
and compile from coffee sources: `sudo npm -g install coffee-script`*
|
2013-11-19 13:53:36 +00:00
|
|
|
|
2013-11-13 15:21:58 +00:00
|
|
|
Clone project:
|
|
|
|
|
|
2013-11-28 15:05:47 +00:00
|
|
|
git clone https://github.com/dominicbosch/webapi-eca.git
|
2013-11-13 15:21:58 +00:00
|
|
|
|
|
|
|
|
Download and install dependencies:
|
|
|
|
|
|
|
|
|
|
cd webapi-eca
|
|
|
|
|
npm install
|
|
|
|
|
|
2014-04-05 00:05:51 +00:00
|
|
|
Get your [redis](http://redis.io/) instance up and running (and find the port for the config file below) or create your own `js/persistence.js`.
|
2013-11-13 15:21:58 +00:00
|
|
|
|
2013-11-20 14:41:41 +00:00
|
|
|
Edit the configuration file:
|
2013-11-13 15:21:58 +00:00
|
|
|
|
2014-04-05 00:05:51 +00:00
|
|
|
vi config/system.json
|
2013-11-28 15:05:47 +00:00
|
|
|
|
2013-11-20 14:41:41 +00:00
|
|
|
Apply your settings, for example:
|
2013-11-13 15:21:58 +00:00
|
|
|
|
|
|
|
|
{
|
2014-04-05 00:05:51 +00:00
|
|
|
"http-port": 8125, # The port on which the system listens for requests
|
|
|
|
|
"db-port": 6379, # The db-port where your redis instance is listening
|
|
|
|
|
"log": { ### logging configurations
|
|
|
|
|
"mode": "development", # if set to productive no expensive origin lookup is performed and logged
|
|
|
|
|
"io-level": "info", # the log-level for the std I/O stream
|
|
|
|
|
"file-level": "info", # the log-level for the log file
|
|
|
|
|
"file-path": "server.log" # log file path, relative to cwd
|
2014-04-06 00:22:39 +00:00
|
|
|
"nolog": "false" # false if no log shall be generated at all. Mainly used for unit tests
|
2014-04-05 00:05:51 +00:00
|
|
|
}
|
2013-11-13 15:21:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Start the server:
|
|
|
|
|
|
2014-04-05 00:05:51 +00:00
|
|
|
run_engine.sh
|
2013-11-13 15:21:58 +00:00
|
|
|
|
|
|
|
|
*Congratulations, your own WebAPI based ECA engine server is now up and running!*
|
|
|
|
|
|
2013-11-28 15:05:47 +00:00
|
|
|
|
2014-04-06 00:22:39 +00:00
|
|
|
Optional command line scripts
|
|
|
|
|
-----------------------------
|
|
|
|
|
|
|
|
|
|
Run test suite:
|
|
|
|
|
|
|
|
|
|
run_tests.sh
|
|
|
|
|
|
2013-11-13 15:21:58 +00:00
|
|
|
Create the doc *(to be accessed via the webserver, e.g.: localhost:8125/doc/)*:
|
|
|
|
|
|
2014-02-04 15:40:32 +00:00
|
|
|
> **WARNING:**
|
|
|
|
|
|
|
|
|
|
> *manual adjustment of `./node_modules/groc/lib/styles/default/docPage.jade` required until groc is fixed:*
|
|
|
|
|
|
|
|
|
|
> *`!!! 5` needs to be relaced with `doctype html`*
|
|
|
|
|
|
2014-04-06 00:22:39 +00:00
|
|
|
run_doc.sh
|