Commit 9a89881b authored by Alex Hoyau's avatar Alex Hoyau

changed readme now that some of it is in the wiki thx to @stache1draht

parent 3a9aa08f
......@@ -30,145 +30,13 @@ Contact us and let people know about Silex
* [Google plus](
* [Contributors list](
## Host an instance of Silex
## Host an instance of Silex on a server or run Silex on your computer
If you plan to host Silex for your clients, your users or the community, this section is for you.
If you feel like helping and host an instance of Silex as an alternative to the official Silex site please let us know so that we can advertise it to the community.
You will need a nodejs server, which you can setup yourself or host at [Gandi]( or [IndieHosters]( for example.
Download the zip file on github or clone this repository, and then follow the same steps as the developers when they install silex locally on linux - starting at npm install. See instructions bellow.
For the lazy ones, there is the [Heroku One-Click Deploy]( [![Deploy](](
For Heroku as for Gandi, you need to set environments variables, see the environment variables bellow.
## Installation on your local computer
This is for developers only, since our beloved designers can use the [online version](
Developers you can clone this repository and start Silex, with nodejs. To do this you can use just nodejs or Docker, see instructions bellow.
### Recommended: with Docker
Prerequisite :
* [docker](
Clone this repo with `git clone` and then `cd Silex`
Build the docker image for Silex
$ docker build -t silex-image .
$ docker run -p 6805:6805 -t silex-image
Open http://localhost:6805/ and you are ready!
The default env vars can be overriden using the `-e` option in docker run, see the section about env vars bellow
### local installation on linux or macos or cloud9
* [node.js]( installed
* [NPM]( installed
* [python]( (version >= V2.7)
* [java]( (version >= 7)
Clone this repository, and do not forget the sub modules (cloud-explorer and unifile)
$ git clone --depth 10
Install all needed modules and build the assets
$ npm install
$ npm run build
Start the server and then open [http://localhost:6805/](http://localhost:6805/) - note that the port is 6805, which is easy to remember, since it is the date of sexual revolution started in paris france 8-)
$ npm start
> Note for [cloud9]( users: you may want to activate python with this command:
$ nada-nix install python
And finally, take a look at the "available commands" section bellow
### local installation on Windows
> instructions provided by Régis RIGAUD:)
* [node.js]( installed
* Git Client installed (e.g. [windows github client](
* [NPM installed](
* [python](
Installation of Silex:
* Launch the "Git Shell"
* Create a clone of Silex Project: git clone --depth 10
* Go to Silex's Directory.
* install depedencies : npm install
Start Silex:
* Launch Silex from a command prompt (Silex's Directory): `npm start`
* Open your favorite browser on http://localhost:6805/ and ENJOY !!!
* also take a look at the "available commands" section bellow
### Available commands
If you develop or debug Silex, these npm scripts can be used with npm (they are defined in the file [package.json](./package.json))
* `$ npm start` will start the server
* `$ npm run start:debug` will start the server in debug mode (no error catchall, enable local service to use local file system as a storage)
* `$ npm run build` will build the client side code (html, css, js), ready for production
* `$ npm run build:server` this only check that the server scripts are correct
* `$ npm run watch:client` will watch the html, js and css source folders and rebuild when a file changes
### environment variables
* `SERVER_URL` base URL of your Silex instance, passed to OAuth services like github si they can come back to you with a token
* `PORT`, optional, default: 6805, [used here in the code](dist/server/server.js#L148)
* `SSL_PORT`, optional, default: to 443, [used here in the code]()
* `SILEX_FORCE_HTTPS`, optional [used here in the code](dist/server/server.js#102) to force https/ssl (default is `false`)
* `SILEX_SSL_PRIVATE_KEY`, optional (see ssl section bellow), [used here in the code](dist/server/server.js#L124)
* `SILEX_SSL_CERTIFICATE`, optional (see ssl section bellow), [used here in the code](dist/server/server.js#L124)
* `SILEX_FORCE_HTTPS_TRUST_XFP_HEADER`: optional, useful only if `SILEX_FORCE_HTTPS` is true, [see the param `trustXFPHeader` in this doc](
* `SILEX_SESSION_FOLDER`, optional, default: `$HOME/.silex/sessions`, [used here in the code](dist/server/server.js#L53)
* `SILEX_DEBUG`, optional, default: `false`, when `true` this will enable the service "www" (storage on the local server in `www/`) with login `admin` and pass `admin`, [used here in the code](dist/server/server.js#L78)
* `GITHUB_CLIENT_ID` and `GITHUB_CLIENT_SECRET`: optional, to activate github service, you need to create a github app to get these info ([create a github app]( to get those)
* `DROPBOX_CLIENT_ID` and `DROPBOX_CLIENT_SECRET`: optional, this will activate Dropbox service, you need to create a Dropbox app on
* `ENABLE_FTP`, `ENABLE_SFTP`, `ENABLE_WEBDAV`, `ENABLE_FS`: optional, used to activate the corresponding services
* `SILEX_ELECTRON`: this is set by Silex electron app, in order to activate the `fs` service and access your file system from within Silex
> Tip: for your tests on localhost, you can use these test apps
> ```
> $ export DROPBOX_CLIENT_ID=ckixgyo62obeo05
> $ export DROPBOX_CLIENT_SECRET=ptg6u5iw7gs6r6o
> $ export GITHUB_CLIENT_ID=f124e4148bf9d633d58b
> $ export GITHUB_CLIENT_SECRET=1a8fcb93d5d0786eb0a16d81e8c118ce03eefece
> ```
### enable https / SSL
When you start Silex, it looks for the environment variables `SILEX_SSL_PRIVATE_KEY` and `SILEX_SSL_CERTIFICATE`. If they are present, it enables SSL.
`SILEX_SSL_PRIVATE_KEY` is expected to be the path to a `.key` file, and `SILEX_SSL_CERTIFICATE` the path to a `.crt`.
See this [help section about installing Silex on a server or on your computer, about environment variables, see how to run it with docker or build it from source, etc.](
Please note that there is also an effort to make Silex a desktop software (in opposition to online app), you can [test the offline version of Silex from here](
## Size of the project's code base
......@@ -254,10 +122,10 @@ SUM: 541 12030 16712 66869
These are the upstream projects we use in Silex
* [unifile](, a nodejs server which provides a unified access to cloud services. This projects uses nodejs and these modules: express, dbox, express, googleapis, logger, node-oauth, oauth, path
* [Cloud explorer](, a file manager for the cloud services. It is a front end javascript app which connects to a unifile server
* [Prodotype](, Build components and generate a UI to make them editable in your app.
* [ace](, an excellent code editor in javascript
* google closure library and compiler
* [unifile](, a nodejs library which provides a unified access to cloud services
* [Cloud explorer](, a file manager for the cloud services. It is a front end javascript app which connects to a unifile server
* [Prodotype](, Build components and generate a UI to make them editable in your app
* [Ace](, an excellent code editor in javascript
* [Google closure compiler]( is used to build Silex, for its optimizations and the type system which helps with error detection
* jquery and jquery UI are included in the sites generated by Silex
* [GLYPHICONS library of precisely prepared monochromatic icons and symbols]( ([CC license](
* [GLYPHICONS library of icons and symbols]( ([CC license]( and [fontawesome icons](
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment