|
This can be done in two steps:
Step 2 can be performed using the following commands:
Hope that helps!
This answer is marked "community wiki".
Thanks for this guide, but how do you then view the application? How do you point a domain at the helloworld application? Hi, You need to assign this app to a website. Requests made for this website will then be forwarded to the port assigned to the app. I hope this clears it up. Yep, the problem is that the app is located at $HOME/helloworld: with Webfaction, doesn't it need to be at $HOME/webapps/helloworld in order to be spotted as an app? No, that's not the case here. When you assign a "Custom Application (Listening on port)" app to a site, it's just used as a placeholder so nginx (the frontend web server) can forward the requests for this site to the correct port. To map the app to this site, you just need to make sure that it's configured to run on the correct port. require.paths.push has been deprecated. Add this to your
It's been almost a year since this was first posted - are there any plans to add a node installer? btw - these instructions are not working for me with node version 0.8.4. No, we still have no plans to add a Node installer - there's an updated guide written by one of our users here: Real-World node.js (using Webfaction) - Part 1 The source for npm has been updated to https://npmjs.org/install.sh Great guide! Thanks, I've edited the original answer to reflect the new install URL. Also worth noting that as of the 0.6 branch, npm is bundled with node so no need to install it separately I've now updated this guide from node I'm Happy! Thanks :) Thanks for this guide. It worked perfectly. Initially, I tried other methods to get around the python problem, but this did the trick. Thanks again! Hai, Am getting this error while giving the command npm install -g express root@otc-desktop:~# npm install -g express npm http GET https://registry.npmjs.org/express npm http GET https://registry.npmjs.org/express npm http GET https://registry.npmjs.org/express npm ERR! Error: tunneling socket could not be established, cause=socket hang up npm ERR! at ClientRequest.onError (/root/lib/node_modules/npm/node_modules/request/tunnel.js:161:17) npm ERR! at ClientRequest.g (events.js:185:14) npm ERR! at ClientRequest.EventEmitter.emit (events.js:88:17) npm ERR! at CleartextStream.socketErrorListener (http.js:1330:9) npm ERR! at CleartextStream.EventEmitter.emit (events.js:88:17) npm ERR! at SecurePair.exports.connect.cleartext._controlReleased (tls.js:1267:15) npm ERR! at SecurePair.EventEmitter.emit (events.js:88:17) npm ERR! at SecurePair.error (tls.js:921:10) npm ERR! at EncryptedStream.CryptoStream._done (tls.js:395:17) npm ERR! at EncryptedStream.CryptoStream._pull (tls.js:546:12) npm ERR! If you need help, you may report this log at: npm ERR! http://github.com/isaacs/npm/issues npm ERR! or email it to: npm ERR! npm-@googlegroups.com npm ERR! System Linux 2.6.32-41-generic npm ERR! command "/root/bin/node" "/root/bin/npm" "install" "express" npm ERR! cwd /root npm ERR! node -v v0.8.9 npm ERR! npm -v 1.1.61 npm ERR! code ECONNRESET npm ERR! npm ERR! Additional logging details can be found in: npm ERR! /root/npm-debug.log npm ERR! not ok code 0 Pls tell me anybody how to solve this issue... thanks, vidhya This looks like a local issue, rather than in a WebFaction environment. Since we are not aware of your local setup, our support is limited. Judging from the error shown this looks like a network issue but I'd suggest you take a look at your /root/npm-debug.log file for more info and maybe try to the contact node's community on this issue instead. i just cant handle this. i tried everything. Node works good, npm works good. I can install express but when i use the command "express" always appears "command not found". I am desperate everything works except this "express module". I am using Mountain Lion OSX. I hope somebody can help
showing 5 of 16
show all
|
|
Thanks. This was great information. Worked very well for me. One simplification. Instead of the convoluted tricks with MYPY, you can simply do the following:
This worked perfectly for me, without having to muck around with the PATH. |