Skip to content

Silex for hosting providers

Alex Hoyau edited this page Sep 12, 2018 · 18 revisions

This page is a work in progress

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(...)

WARNING: Support for Silex v2 has stopped. Try Silex v3 alpha, Read about it, Subscribe to the newsletter

Clone this wiki locally