Electron architecture API calls

送分小仙女□ 提交于 2020-02-23 03:41:11

问题


Hello Stackoverflow Community,

I'm currently diving in into cross-platform apps with Electron. As I'm a newbie to this topic there are some uncertainties: In "normal" webdevelopment I would write an API in Go(lang) which processes JSON files. Is it possible to set up Electron like an offline server which can make API calls?

Thank you in advance. I really appreciate your help.


回答1:


Yes, it is possible and and here is a library go-astilectron that demonstrates this approach. You can read more in the article How to add a GUI to your Golang app in 5 easy steps (powered by Electron). It's based on this project astilectron - Electron app that provides an API over a TCP socket that allows executing Electron's method as well as capturing Electron's events.



来源:https://stackoverflow.com/questions/50782786/electron-architecture-api-calls

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!