您可以使用 mup 在单个服务器上托管多个流星应用程序。mup.js
文件应该都指向同一个服务器,但每个都应该指定一个唯一的域。
使用以下 2 个mup.js
文件,您将在以下位置托管应用程序:
// app1/mup.js
module.exports = {
servers: {
one: {
host: '45.76.111.111',
username: 'root',
password: 'password'
}
},
app: {
name: 'App1',
env: {
// If you are using ssl, it needs to start with https://
ROOT_URL: 'http://app1.servername.com',
},
},
// Use the proxy to setup ssl and to route requests to the correct
// app when there are several apps
proxy: {
domains: 'app1.servername.com',
}
};
// app2/mup.js
module.exports = {
servers: {
one: {
host: '45.76.111.111',
username: 'root',
password: 'password'
}
},
app: {
name: 'App2',
env: {
// If you are using ssl, it needs to start with https://
ROOT_URL: 'http://app2.servername.com',
},
},
// Use the proxy to setup ssl and to route requests to the correct
// app when there are several apps
proxy: {
domains: 'app2.servername.com',
}
};