可以通过django应用程序为nodejs服务器打开一个开放端口? [英] can openshift give me a open port for nodejs server in django app?
问题描述
我在openshift中创建了一个 django
的应用程序。已经我想添加 node.js
。但是,$ code> node.js 需要打开端口进行侦听:
var http = require('http');
var server = http.createServer()。listen(4000);
首先我决定安装 node.js
从此处,但我收到错误:
我搜索每一个djangoApp但是我没有得到答案:(
问题:是否可以将node.js添加到django应用程序并使用端口连接到node.js?
为什么不做一个可扩展的应用程序?这样你可以运行一个django应用程序在一个齿轮上,另一个齿轮上的node.js
I create an django
based app in openshift. already I want to add node.js
to it.But node.js
needs open port for listening :
var http = require('http');
var server = http.createServer().listen(4000);
first I decide to install node.js
from here but I got error:
You can only have one framework cartridge in your application 'djangoApp'.
I search every where but I don't get the answer :(
question : is this possible to add node.js to django app and use a port to connect to node.js ?
Why don't make a scaleable application? That way you could maybe run a django app on one gear and node.js on another gear
这篇关于可以通过django应用程序为nodejs服务器打开一个开放端口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!