Tag: 子域名

为新的heroku进程分配子域名

我正在使用node.js&sails。 所以我想产生另一个heroku进程,例如:'node app2.js'并将子域名分配给它,app2.myherokuname.herokuapp.com 那可能吗? 我正在寻找最佳实践来实现微服务架构,所以我可以使用普通的库,模块等。

我可以在我的Heroku子域中使用子域名吗?

我有一个使用vhostpipe理子域的节点应用程序。 所以,在我的本地主机上,我有: main.localhost admin.localhost api.localhost 在生产中我有: main.example.com admin.example.com api.example.com 我也有一个Heroku的分期系统。 所以我想要做的是: main.example.herokuapp.com admin.example.herokuapp.com api.example.herokuapp.com 这似乎并不奏效。 有没有办法实现它,还是我需要创build一个单独的域名并指向我的名称服务器?

开发具有子域名的Web应用程序

我的应用程序将有一个每个客户的子域显示他们的标志和一些其他的东西: company1.service.com company2.service.com 我试图看看在开发过程中最好的工作方式是什么: configuration开发机器的HOST文件做一些映射,这样我就可以访问company1.localhost等 使用应用程序将检查的某种秘密configuration标志来确定什么是被覆盖的域 根本不要使用子域(甚至在生产中),而更喜欢查询string 我认为#1对我来说应该没问题,只是想看看是否有人对它有不好的经验,或者对其他select有好处。

具有Restify和nodejs的多个子域

我正在使用Restify开发nodejs应用程序。 应用程序必须为应用程序提供一个API,一个基于angular度使用API​​的静态公共站点,另一个静态但私有的angular度站点,pipe理UI也会使用该API。 我已经设法为公共静态网站和API设置路由。 pipe理员给我头痛。 我需要在不同的子域中暴露pipe理员,例如: admin.mysite.com ,而api和公共站点则在www.mysite.com ( www.mysite.com的api)上提供。 这是我迄今为止configuration它: // restify route configuration for the public HTML site server.get(/^\/(?!api)/, restify.serveStatic({ directory: './client/', default: 'index.html' })); // restify route configuration for the API, using directory structure for route setup. routes(function(routes){ console.log(routes); routes.forEach(function(route){ server[route.method](route.route, route.handler); }); }); 我怎样才能configurationrestify服务,通过serveStatic ,pipe理的HTML用户界面在不同的子域在同一个nodejs服务器上?

用nodeJS在Heroku上dynamic创build子域名?

是否有可能dynamic地添加子域名到指向你的英雄应用程序的自定义域? 例如,您正在创build一个允许用户创build自己的页面的应用程序。 假设www.example.com指向您的heroku应用程序,并且名为John的用户创build了一个页面,并且您的应用程序创build了具有johns内容的john.example.com 。 对于节点,你可以通过快速路由吗?

Express.js vhost子域设置

尝试设置连接的虚拟主机中间件。 会喜欢一些帮助。 我有我的正常express.js应用程序,与node_modules,公共,视图和路线目录。 我已经添加了另一个目录旁边的那些持有另一个express.js应用程序。 我已经添加了这一行到我的顶级应用程序(tedxgramercy): app.use(express.vhost('chatter.tedxgramercy.com', require('./chatter/app.js').app)); 而这一行我的聊天应用程序: var app = exports.app = express(); 聊天应用程序调用监听端口8000,主要(顶级)应用程序调用监听端口3000.我不知道是否是正确的。 当我启动我的应用程序(节点应用程序),它运行良好,我可以访问localhost:3000和localhost:8000两个应用程序分别,但是当我部署到我的服务器,子域http://chatter.tedxgramercy.com不工作。 任何指针? 我必须改变我的DNS指向其他端口或什么?

如何configuration应用程序可用的子域cookie?

我需要在主域和所有子域之间共享会话cookie。 我有两个基于expressjs框架的nodejs服务: // example.local … app.use(session({ cookie: { domain: "example.local" } , key: 'sid' , secret: '[my secret]' , saveUninitialized: true , resave: true , store: new RedisStore({ host: 'localhost', port: 6379 }) })); // blog.example.local … app.use(session({ // what should I write here? <——— })); 所以我的问题是我应该在blog.example.local会话configuration中blog.example.local来访问example.local现有cookie? 编辑:作为@yeinielbuild议,我应该使用相同的configuration为blog.example.local如下所示: // blog.example.local … app.use(session({ cookie: { domain: […]