简体   繁体   English

通过Cordova部署时,服务器端流星代码在哪里运行?

[英]Where does serverside meteor code run when deployed via cordova?

I was thinking about how to architect my project. 我在考虑如何设计我的项目。 Im making a meteor webapplication for the normal browser, which will be a 'eventmanager'. 我正在为普通浏览器制作一个流星Web应用程序,它将是一个“事件管理器”。 which will be used to make events, that a seperate meteor app will then connect to via ddp, signup for the events etc. 它将用于制作事件,然后一个单独的流星应用程序将通过ddp连接到该流星,并注册事件等。

So im obviously using DDP to connect the two apps but suddenly i was wondering where meteor places the serverside code in a mobile application, since this is a huge deal, a mobileapp has to work even when not on the internet, so i thouth that it would be logical that some of the serverside rendering was happening offline on the phone, and if thats not the case, well then i would have to seperate my app somehow, into something that renders with the localstorage data if not connected to the internet & i would have to sync the two applications databases + local storage. 因此,我显然使用DDP来连接这两个应用程序,但是突然间,我想知道流星将服务器端代码放置在移动应用程序中的位置,因为这是一笔大数目,所以即使不在Internet上,移动应用程序也必须能够工作,所以我想逻辑上说某些服务器端渲染是在电话上离线进行的,如果不是这样,那么我就必须以某种方式将我的应用程序分开,分解成可以与本地存储数据进行渲染的东西(如果未连接到互联网)将必须同步两个应用程序数据库和本地存储。

Im thinking that the serverside code does run on the mobile phone, it just feels counterintuitive that each mobile phone has its own 'server'. 我以为服务器端代码确实可以在手机上运行,​​所以每台手机都有自己的“服务器”只是一种直觉。

thanks for any help :) 谢谢你的帮助 :)

Cordova is just a wrapper. 科尔多瓦只是一个包装。 It works just like any other browser. 它的工作原理与其他任何浏览器一样。 While it does provide API access to the hardware, the app itself is not native. 虽然它确实提供了对硬件的API访问,但该应用程序本身不是本机的。 It's a hybrid app platform. 这是一个混合应用平台。

The client side runs within the app container (Cordova) and communicates with the server portion over sockets. 客户端在应用程序容器(Cordova)中运行,并通过套接字与服务器部分进行通信。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM