流星:一个后端-多个不同的前端2x Web和1x mobile [英] Meteor: one backend - multiple different front-ends 2x web and 1x mobile

查看:238
本文介绍了流星:一个后端-多个不同的前端2x Web和1x mobile的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想要一个可以服务于多个不同前端的流星服务器:

I want one meteor server that can serve multiple different front-ends:

  • 简单的Web应用程序
  • 管理网络应用
  • 移动应用

每个应用程序都有几乎完全不同的HTML.将这3个软件包打包在一起并不是Admin和Mobile应用程序的阻止者,但是如果Simple Web应用程序被其他两个应用程序中的代码肿,则是一个阻止者.

Each app has almost completely different HTML. Having all 3 packaged together isn't a blocker for the Admin and Mobile apps, but it is a blocker if the Simple Web app gets bloated with code from the other two.

我对Meteor的构建过程了解不足,无法制定解决方案.我真的可以从最佳实践中寻求帮助

I don't understand enough about the Meteor build process to work out a solution. I could really use some help with best practices

我尝试过的一些事情:

  1. 单独的应用程序->单独的存储库.我陷入尝试将移动应用指向简单应用存储库的问题.
  2. 单独的应用->相同的存储库.不知道该如何组织.流星似乎很确定一切都是一个应用程序
  3. 一个应用->一个存储库.应用检测到手机并使用其他模板? 设备检测看起来已经废弃(向铁路由器提出PR,但从未合并) ).
  1. Separate apps -> separate repos. I got stuck trying to point the Mobile App at the Simple App repo.
  2. Separate apps -> same repo. Not sure how to organize this. Meteor seems pretty sure everything is one app
  3. One App -> One repo. App detects mobile and uses different template? device-detection looks abandoned (asked for a PR for iron-router, but never merged it).

有什么建议吗?如果您的Meteor网站的移动应用程序与它的Web应用程序几乎完全不同,那么您将如何管理它?

Any suggestions? If your Meteor site's mobile app is almost completely different than its web app, how do you manage it?

推荐答案

我一直在使用符号链接,并且已经成功.这是我的git repo的样子(或多或少):

I've been using symlinks and it's been successful. Here's how my git repo looks (more or less):

/all
/all/public
/all/client
/all/server

/app1/client
/app1/client/shared -> symlink to ../../all/client
/app1/server/shared -> symlink to ../../all/server
/app1/public        -> symlink to ../all/public

/app1/client
/app1/client/shared -> symlink to ../../all/client
/app1/server/shared -> symlink to ../../all/server
/app1/public        -> symlink to ../all/public

干杯!

这篇关于流星:一个后端-多个不同的前端2x Web和1x mobile的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆