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

Idea to move to polyglot Node/browser code #33

Open
brettz9 opened this issue Feb 19, 2022 · 1 comment
Open

Idea to move to polyglot Node/browser code #33

brettz9 opened this issue Feb 19, 2022 · 1 comment

Comments

@brettz9
Copy link

brettz9 commented Feb 19, 2022

Looks like a very polished tool, both for docs, code comments, and typed source code--nice!

Just wanted to suggest that for servers with CORS enabled, a browser client should be able to do pretty much anything that Node can do in the context of a Bot, so wanted to raise the possibility of having Node and browser entrance files, where the Node one would pass along node-fetch and the browser one, pass along window.fetch, etc., and the API would make use of them so one could use your code solely in browser-side code too.

For my purposes at least, I think it should be easier to just write client-side code (which I need for a GUI anyways).

Might not be something on your priority list, but wanted to express to give it some thoughts, if nothing else as an eventual goal perhaps. Thanks and best wishes!

@siddharthvp
Copy link
Owner

@brettz9 It's a fine idea. Mwn currently uses axios which runs on the browser as well. We would still need to make changes, I believe mainly around handling cookies and headers. OAuth may not even work client-side.

Happy to review any PR on this front.

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