如何在同一个数据库中启动多个应用程序? [英] How to start multiple application in same db?

查看:50
本文介绍了如何在同一个数据库中启动多个应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须在本地(管理员和客户端)使用流星应用程序.应用程序运行在不同的端口 30003003 上.我想同时使用这两个应用程序应该使用相同的数据库.export MONGO_URL=mobgodb://127.0.0.1:3001/meteor 就可以了.但我想知道任何参数与流星命令传递以设置环境变量以使用相同的数据库.

I have to meteor application in local (admin and client). Applications run on different port 3000 and 3003. I want to use both app should use the same DB. export MONGO_URL=mobgodb://127.0.0.1:3001/meteor will be okay. But I would like to know any argument to pass with meteor command to setup environment variable to use the same DB.

推荐答案

如果您正在寻找启动脚本,您可以执行以下操作:

If you are looking for a start script you could do the following:

在您的应用程序的根目录中,创建一个名为 start.sh 的文件:

In the root of your app, create a file called start.sh:

#!/usr/bin/env bash
MONGO_URL=mobgodb://127.0.0.1:3001/meteor meteor --port 3000

然后运行chmod +x start.sh

然后您只需输入 ./start.sh

这篇关于如何在同一个数据库中启动多个应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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