Thanks to visit codestin.com
Credit goes to github.com

Skip to content

resilientred/Silex

 
 

Repository files navigation

license: GPL Build Status status of silex.me instance

About Silex, live web creation.

Silex, is a free and open source website builder in the cloud. Create websites directly in the browser without writing code. And it is suitable for professional designers to produce great websites without constraints. Silex is also known as the HTML5 editor.

Silex UI

Brought to you by Silex Labs team, promoting free software.

Links

News and tutorials

Contact us and let people know about Silex

Host an instance of Silex

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 http://editor.silex.me/ 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 :

Clone this repo with git clone https://github.com/silexlabs/Silex.git 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

Prerequisite:

Clone this repository, and do not forget the sub modules (cloud-explorer and unifile)

$ git clone --depth 10 https://github.com/silexlabs/Silex.git

Install all needed modules and build the assets

$ npm install
$ npm run build

Start the server and then open 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:)

Prerequisite:

Installation of Silex:

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)

  • $ 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
  • SSL_PORT, optional, default: to 443, used here in the code
  • SILEX_FORCE_HTTPS, optional used here in the code to force https/ssl (default is false)
  • SILEX_SSL_PRIVATE_KEY, optional (see ssl section bellow), used here in the code
  • SILEX_SSL_CERTIFICATE, optional (see ssl section bellow), used here in the code
  • 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
  • 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
  • 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 developers.dropbox.com
  • 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.

Size of the project's code base

As of june 2017, around 100.000 lines of code. See github API count (includes blank lines and comments I guess):

JavaScript: 856643,
CSS: 82702,
HTML: 53727,
Shell: 1532

cb372's report:

File Type Files Lines of Code Total lines
JavaScript 422 138797 183644
Json 3 146 146
Text 12 0 1047
Shell 4 24 47
Stylesheets 90 17777 21504
Html 7 545 726

Cloc's report:

-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
JavaScript                     404           9616          14937          50841
CSS                             75           1580           1652          11394
LESS                            20            141             87           1768
Markdown                        10            334              0            657
YAML                            14              3              1            581
HTML                             7            177             22            527
JSON                             3              0              0            146
Bourne Shell                     4              6             13             28
-------------------------------------------------------------------------------
SUM:                           541          12030          16712          66869
-------------------------------------------------------------------------------

dependencies

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
  • jquery and jquery UI are included in the sites generated by Silex
  • GLYPHICONS library of precisely prepared monochromatic icons and symbols (CC license)

About

Silex is a static website builder in the cloud.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 86.2%
  • CSS 8.1%
  • HTML 5.5%
  • Shell 0.2%