Silex for hosting providers

Alex Hoyau edited this page Dec 4, 2018 · 7 revisions

This page is a work in progress

Please start with the page "How to Host An Instance of Silex".

Context

This documentation is dedicated to developers who want to provide a website builder to their users, white labeled or not. It is also about how to provide the users with a hosting, i.e. do not use Dropbox or FTP or Github, etc. but your hosting instead.

This is a work in progress and will make it possible to use Silex as any other website builder (Wix or squarespace...), so that your users do not need an FTP account or a Github account.

Links

As @godzone talked about it, hosting companies need to have their users save their websites to their purchased space at the hosting company.

Publish to a hosting directly

The idea we have is to create a service dedicated to each company, which wraps a unifile service and changes the read/write operation's root folder depending on the user. One thing to consider is that a user can have the right to write to several different accounts.

We have considered wrapping the fs service to write to a mounted drive on the silex server, and @JbIPS is working on a secured service which writes with the user access rigths. SFTP seems the easier to wrap without security issue, but the hosting company needs to provide to Silex the user's FTP accounts and credentials

Silex config

the idea is to have a separate repository, with Silex as a npm dependency

package.json

...
  "dependencies": {
    "silex": "github:silexlabs/Silex#master",
    "myunifileconnector": "github:you/yourunifileconnector#master"
  }
...

index.js file:

const SilexServer = require('./silex');
const config = require('silex/EnvVarsConfig');
const silex = new SilexServer(config);
// add unifile connectors
silex.ceRouter.addService(...)
// add custom routes
silex.app.get(...)
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.