diff --git a/README.md b/README.md index e2335b81989dbb8cd07347898e2802334392455c..44f2e1e65b05b303b42ca402cf772eff3be46513 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ - + # Cesium @@ -6,11 +6,27 @@ Try it at: http://cesium.duniter.fr -There is a [package](https://github.com/duniter/cesium_ynh) for [YunoHost self-hosting distribution](https://yunohost.org). -## Install +## Installation + +### On desktop computer + + To use Cesium from your desktop computer : + + - Download the [latest release](https://github.com/duniter/cesium/releases/latest). Choose the web packaging (`cesium-vX.Y.Z-we.zip`); + - Unpack in a empty directory; + - Open the `index.html` file in a web browser. + +### On web server + +Cesium can be easily installed on most web server. + +#### Installation script + +For Linux distribution, a installation script could be used to: -Cesium can be easily installed on most web server using the following command: + - Download the [latest release](https://github.com/duniter/cesium/releases/latest) + - Unpack archive into the directory `./cesium`. Existing files will be override. ``` curl -kL https://raw.githubusercontent.com/duniter/cesium/master/install.sh | bash @@ -21,15 +37,70 @@ or: wget -qO- https://raw.githubusercontent.com/duniter/cesium/master/install.sh | bash ``` -This will download and unzip latest release in a `./cesium` directory. -Existing files will be override. **Note**: You may need root permission to write files. If so just replace `| bash` with `| sudo bash`. -## Developer +#### Yunohost package -To contribute and compile cesium, you will have to: +There is a [package](https://github.com/duniter/cesium_ynh) for [YunoHost self-hosting distribution](https://yunohost.org). + +## Configuration + +To change default configuration: + + - Edit the file `config.js`, and set default properties: + +``` +angular.module("cesium.config", []) +.constant("csConfig", { + "timeout": 4000, + "cacheTimeMs": 60000, + "useRelative": true, + "timeWarningExpireMembership": 5184000, + "timeWarningExpire": 7776000, + "useLocalStorage": false, + "rememberMe": false, + "showUDHistory": false, + "node": { + "host": "test-net.duniter.fr", + "port": "9201" + }, + "plugins": { + "es": { + "enable": "false", + "host": "test-net.duniter.fr", + "port": "9203" + } + }, + "version": "0.2.6", + "build": "2016-08-25T07:16:49.361Z", + "newIssueUrl": "https://github.com/duniter/cesium/issues/new?labels=bug" +}); +``` + + - Configure a Duniter node: + + * set `node.host` and `node.port` to the default node address. + + - Configure the optional extension for [ElasticSearch Duniter4j node](https://github.com/duniter/duniter4j) + + * set `plugins.es.host` and `plugins.es.port` to the default ES node address. + + * set `plugins.es.enable` with [true|false] to change the default extension state. + + * To **remove** the extension (and not only disable by default): remove all content inside the `plugins` tag. + Users will NOT be able to enable the extension. + +## License + +This software is distributed under [GNU GPLv3](https://raw.github.com/duniter/cesium/master/LICENSE). + +## Development Guide + +### Prerequisite + +To build Cesium, you will have to: - Installing [nvm](https://github.com/creationix/nvm) ``` @@ -51,6 +122,7 @@ To contribute and compile cesium, you will have to: sudo apt-get install build-essential ``` +### Source code - Getting source and installing project dependencies: ``` @@ -58,28 +130,34 @@ To contribute and compile cesium, you will have to: cd cesium npm install bower install - ionic state restore ``` - Installing Cordova plugins ``` ionic state restore ``` - - Compiling and running application +### Build environment + + - To configure your build environment : + + * Add your environment config into `app/config.json` + + * Update default configuration, using the command: + ``` - gulp & ionic serve + gulp config --env <your_env_name> ``` -### Manage configuration + This will update the configuration file used by cesium, at `www/js/config.json`. + +### Compile and launch - - To build on another environment : - - Add your environment config into `app/config.json` - - Run compitaltion using option `--env`: + - Compiling and running Cesium: + ``` - gulp config --env <your_env_name> + ionic serve ``` - This will update the configuration file used by cesium, at `www/js/config.json`. ### Best pratices