Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add custom unifile services #803

Closed
lexoyo opened this issue Sep 6, 2018 · 3 comments
Closed

add custom unifile services #803

lexoyo opened this issue Sep 6, 2018 · 3 comments

Comments

@lexoyo
Copy link
Member

lexoyo commented Sep 6, 2018

@JbIPS @Godzone what do you think?
This is where you would add custom services
https://github.com/silexlabs/Silex/pull/802/files#diff-f4e33cb9922134499ac778b8b3566937

I did not test this with a service, but it should work even if unifile and express are started already when you add services and routes for callbacks

@lexoyo lexoyo added this to the Silex for hosting companies milestone Sep 6, 2018
@lexoyo
Copy link
Member Author

lexoyo commented Sep 6, 2018

Oh and I forgot to say that the use case is for a hosting company 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(...)

@ghost
Copy link

ghost commented Sep 6, 2018 via email

@lexoyo
Copy link
Member Author

lexoyo commented Dec 4, 2018

Silex is now an npm dependency, one can add it to a project and set the config and add custom services or hosting providers

would someone test this with me?

@lexoyo lexoyo closed this as completed Feb 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant