can openshift give me a open port for nodejs server in django app?

左心房为你撑大大i 提交于 2019-12-13 06:05:04

问题


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 ?


回答1:


You could potentially download and untar nodejs in your ~/app-root/data directory and configure your server.js to listen on a internal port.




回答2:


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



来源:https://stackoverflow.com/questions/20805949/can-openshift-give-me-a-open-port-for-nodejs-server-in-django-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!