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

How would you use servicemode? #99

Closed
developedsoftware opened this issue Mar 23, 2023 · 3 comments
Closed

How would you use servicemode? #99

developedsoftware opened this issue Mar 23, 2023 · 3 comments

Comments

@developedsoftware
Copy link

As I understand it, it allows you to include flow as part of a bigger app. But I cannot see any implementations of this for inspiration?

@petersirka
Copy link
Collaborator

petersirka commented Mar 23, 2023

The servicemode option is a special mode for the Total.js framework. It will run the app without an HTTP server. I didn't test this mode with the Flow, but the Flow uses our standard predefined starting script: https://github.com/totaljs/framework4/blob/master/helpers/index.js.

If you're looking for something special, please look at these repositories:

What is the service mode used for? Imagine that you need to create a service (not in Flow) that can do some DB operations or imports or provide some events without needing to publish its API. Service mode will run the app as usual, but without mentioning an HTTP server.

@developedsoftware
Copy link
Author

Ah OK understand. If flow isn't started with a web server running would you essentially have to build your own UI and routers to interact with the application.

Am I right in assuming service mode just exposes the api ?

Apologies if I am missing some key concept here!

@petersirka
Copy link
Collaborator

Ah OK understand. If flow isn't started with a web server running would you essentially have to build your own UI and routers to interact with the application.

No because how do you want to build UI to the Flow if the web server is not started?

Am I right in assuming service mode just exposes the api ?

No, it doesn't expose the API. API is blocked/not started in service mode.

Apologies if I am missing some key concept here!

The service mode isn't meant for the service / REST API. It's deaf and blind.

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

2 participants