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

Does this serve work with Reactjs both without backend? #1109

Closed
JonathanSum opened this issue Jun 4, 2021 · 2 comments
Closed

Does this serve work with Reactjs both without backend? #1109

JonathanSum opened this issue Jun 4, 2021 · 2 comments

Comments

@JonathanSum
Copy link
Contributor

JonathanSum commented Jun 4, 2021

Is your feature request related to a problem? Please describe.

Describe the solution

I have been seeing that many people use WebAssembly to make python libraries work in browsers in both python and Reactjs, such as numpy or other ML library.
Thus, it would be great to have Serve using something like WebAssembly to make it work in the browser only without connecting it to the backend.

Describe alternatives solution

@msaroufim
Copy link
Member

Hi @JonathanSum torchserve provides a RESTFUL API you can call from any React js app so yeah should work great. Take a look at one of the examples and if you get a react app working feel free to share it - I'd be happy to feature it in our examples repo

@JonathanSum JonathanSum changed the title Does this serve work with Reactjs or bowser without backend? Does this serve work with (Reactjs or bowser) without backend? Jun 17, 2021
@JonathanSum JonathanSum changed the title Does this serve work with (Reactjs or bowser) without backend? Does this serve work with Reactjs or bowser both without backend? Jun 17, 2021
@JonathanSum JonathanSum changed the title Does this serve work with Reactjs or bowser both without backend? Does this serve work with Reactjs both without backend? Jun 17, 2021
@JonathanSum
Copy link
Contributor Author

JonathanSum commented Jun 19, 2021

@msaroufim
Thank you for answering. I was asking will serve supports put everything in the browser rather than using the restful API way.

I will try to build an example of it using serve with Reactjs in a restful API way or maybe the way that puts everything in the browser, possible by the end of June.

I was thinking if it is not difficult to build a restful API, we do not really need to have another framework like serve makes things less flexible.

edit:
#1149
I will make an example with reactjs when it is able to run on my device.

A very mean common that may be hurtful. I shouldn't make this common here because I have not even been able to run the torch serve. But I still do not understand why we need it. It is not difficult to build a RestfulAPI backend other than the Python backend framework. I really do not see the reason why we use torch serve.

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