托管NodeJS应用程序

时间:2013-02-22 07:40:21

标签: node.js hosting express

我在本地使用NodeJS创建了我的个人网站,它完美无缺。但现在,我想在主机上托管我的应用程序。我试图在AppFog上主持,但它不起作用,会话不起作用,它们有时会破坏,我不知道问题出在哪里,因为它们在本地(会话)中运行良好......

此外,我在JSDOM模块中出错,它在AppFog上不起作用,但它适用于我本地安装的NodeJS(v0.8.15)。

错误:

TypeError: Cannot read property 'implementation' of undefined
at exports.env.exports.jsdom.env.processHTML (/mnt/var/vcap.local/dea/apps/anthonycluse-1-  0c3b7373ee2a0a1334d2ea77a9bf22c8/app/node_modules/jsdom/lib/jsdom.js:178:59)
at Object.exports.env.exports.jsdom.env (/mnt/var/vcap.local/dea/apps/anthonycluse-1-   0c3b7373ee2a0a1334d2ea77a9bf22c8/app/node_modules/jsdom/lib/jsdom.js:269:5)
at exports.index.Creation.findAll.success.Post.findAll.success.async.map.res.render.creations (/mnt/var/vcap.local/dea/apps/anthonycluse-1- 0c3b7373ee2a0a1334d2ea77a9bf22c8/app/routes/index.js:50:23)
at _asyncMap (/mnt/var/vcap.local/dea/apps/anthonycluse-1-0c3b7373ee2a0a1334d2ea77a9bf22c8/app/node_modules/async/lib/async.js:222:13)
at async.each (/mnt/var/vcap.local/dea/apps/anthonycluse-1-0c3b7373ee2a0a1334d2ea77a9bf22c8/app/node_modules/async/lib/async.js:99:13)
at Array.forEach (native)
at _each (/mnt/var/vcap.local/dea/apps/anthonycluse-1-0c3b7373ee2a0a1334d2ea77a9bf22c8/app/node_modules/async/lib/async.js:32:24)
at async.each (/mnt/var/vcap.local/dea/apps/anthonycluse-1-0c3b7373ee2a0a1334d2ea77a9bf22c8/app/node_modules/async/lib/async.js:98:9)
at _asyncMap (/mnt/var/vcap.local/dea/apps/anthonycluse-1-0c3b7373ee2a0a1334d2ea77a9bf22c8/app/node_modules/async/lib/async.js:221:9)
at Object.doParallel [as map] (/mnt/var/vcap.local/dea/apps/anthonycluse-1- 0c3b7373ee2a0a1334d2ea77a9bf22c8/app/node_modules/async/lib/async.js:199:23)

我可以在哪里托管我的NodeJS网站?

安东尼

2 个答案:

答案 0 :(得分:2)

许多人为此使用Heroku

答案 1 :(得分:0)

我正在使用GigaPros.com node.js hosting托管我的nodejs。到目前为止一帆风顺。您只需获得一个即用型nodejs env,然后简单地将node.js应用程序置于其上。这是一个不同的概念;试一试。