EzDevInfo.com

nodester

Open Source Node.js Hosting Platform

How should I handle cron jobs on nodester?

I'd like to watch for certain changes on a couchdb in a NodeJS app, currently hosted on Nodester.

Is it OK to just open long polling sockets or use setTimeout() in a Nodester app? Or is there some typical way people handle this on Nodester or similar hosts?


Source: (StackOverflow)

On cloud9, how do you push one config for nodester, another to github

Okay, so wanting to start a little oss project via c9. I'd like to publish one config (private to nodester, containing for example mongolab credentials). I would rather not have this information in the example config that goes to github... how do others handle this?

Also, is this possible on a free c9 account?


Source: (StackOverflow)

Advertisements

Can I map local branches to remote branches with different prefixes in git?

We're working with a semi-centralized git repository here where I work. Each developer has their own subtree in the central git repository, so it looks something like this:

master
alice/branch1
alice/branch2
bob/branch1
michael/feature
release/1.0
release/1.1

Working locally in my tree I have topic/feature, which corresponds to michael/feature in the central tree.

I've been using

git push origin topic/feature:michael/feature

to push my changes to the remote tree. However, this is cumbersome and prone to mistakes (e.g. omitting the developer name, misspelling the feature name, etc.).

I'm looking for a cleaner way to do this. For instance, "git push". I suspect that setting a different remote with a modified fetch refspec will do it, but I'm not sure how exactly to do it. I'm also not sure how to modify my current branch definitions to use the different remote.

My current .git/config looks something like:

[remote "origin"]
    url = git://central/git/project
    fetch = +refs/heads/*:refs/remotes/origin/*
[branch "topic/feature"]
    remote = origin
    merge = refs/heads/michael/project

Edit: I'd also like to apply this to pulls/fetches. But does the branch.<name>.merge take care of that?

I'll continue to research this and post here if I find something, but I'm hoping to get some other good ideas.

Edit 2: I've decided I'll keep local and remote branch names the same. It appears it will be the least work and least prone to future problems.


Source: (StackOverflow)

How are npm packages managed in nodester?

I don't understand how node packages are managed in nodester. When I run nodester npm install <package-name> from CLI I don't see any packages in my app's source folder. Without these packages visible in my folder, can I use them in usual way (as if I had I installed them in my apps folder directly).

I am advised against storing packages directly in the folder since Nodester offers Node PaaS for free and it would be unkind to not optimize my app and make it use minimal space.

Secondly is there a way through which I can run the app both locally and on nodester. How can I tell git not to push the locally installed git modules. I have heard something like git ignore. How do I manage git ignore so that my local packages are not pushed on nodester?

I might not have been eloquent in framing the question as I am a newbie to node so anyone who can put my question in a better way, feel free to Edit this.


Source: (StackOverflow)

Unable to run Express App on Nodester

I am having trouble deploying express app on nodester.

After successfully running the default hello world app of nodester I ran the following commands on nodester CLI

nodester npm install express

Thereafter I installed the express on the local git of my app

npm install express  
express  
mv app.js server.js // Changed the port from 3000 to the port given to me
git add .
git commit -m 'message'
git push origin master

I seem to have followed all the instructions given by various blogs but when I hit the url (http://dlq.nodester.com) the app shows offline.

Even though running the same app locally does the job. i.e. node server.js runs the app on my local (hitting the url shows Express page). Same app when pushed to nodester doesn't seem to work.

Kindly help


Source: (StackOverflow)

Getting CouchDB to work with node.js

I'm using nodester with iriscouch. I've installed the couchdb-api package. This is my code:

console.log("Running");
//Appears in the logs

var dbServer = require("couchdb-api").srv('eric-wieser.iriscouch.com');
console.log(dbServer);
//Appears in the logs

dbServer.info(function (err, response) {
    console.log("Info!");

    //Never executed. Logs show:
    //Error: ECONNREFUSED, Could not contact DNS servers
    //    at IOWatcher.callback (dns.js:74:15)
});

Why is this not working? What is that error trying to tell me?


Source: (StackOverflow)

Deploy app on nodester

i am going crazy :( I want to setup an app to nodester with windows7. I followed the instructions on http://nodester.com/help

At first i set up git, installed git, genereated a ssh-key and set it up to my profile. Everything works how it is written in the description. ssh -T git@github.com works fine aswell. I have done all these steps with git shell.

Now i want to push my app to nodester using powershell.

npm install nodester-cli -g - worked
nodester user setup <> <>   - worked
 nodester info verifying credentials
 nodester info user verified..
 nodester warn No key file found, encrypt is not going to be strong.
 nodester info writing user data to config
  and a file was .nodester was created in my directory

nodester user setkey        - does not work
 nodester ERROR sshkey was not found: .ssh\id_rsa.pub
 nodester not ok!

Maybe the reason is, that the key is in C:\Users\ME\ .ssh\id_rsa.pub ? How can i change the path?

Now i have done the following:

nodester app create <>
nodester app info <>
git init                 - worked
git add .                - worked
git commit -m "init"     - worked
git remote add nodester <key from nodester app info>
 everything went fine until now
git push nodester master - does not work
 Nodester!
 Connection closed by 50.16.203.53
 fatal: Could not read from remote repository.

 Please make sure you have the correct access rights
 and the repository exists.

Can someone help me to find a solution?


Source: (StackOverflow)

nodester node version error

Every time I try to install a module or list the installed modules with nodester npm, I end up with this.

nodester Error: npm doesn't work with node v0.8.1
nodester Required: node@0.4 || 0.5 || 0.6
nodester     at /usr/lib/node_modules/npm/bin/npm-cli.js:57:23
nodester     at Object.<anonymous> (/usr/lib/node_modules/npm/bin/npm-cli.js:77:
3)
nodester     at Module._compile (module.js:449:26)
nodester     at Object.Module._extensions..js (module.js:467:10)
nodester     at Module.load (module.js:356:32)
nodester     at Function.Module._load (module.js:312:12)
nodester     at Module.runMain (module.js:487:10)
nodester     at process.startup.processNextTick.process._tickCallback (node.js:2

Does anyone know what this message actually means? I can't seem to find any information on it. It's talking about the version of npm on the nodester server judging by the path (I'm on Windows).


Source: (StackOverflow)

Net Module Nodester not Listening to Port

I have a basic node.js app that is designed to open up a connection between two clients and echo the input of one to the other.

var net = require("net");
console.log("Relay Started");
var id = 0;
var Socket = [];
relay = net.createServer(function(socket) {
        socket.on('connect', function() {
                console.log('Connected');
                if(socket.id==null) {
                        socket.id = id;
                        Socket[id]=socket;
                        id++;
                }
        });
        socket.on('data', function(data) {
            data = data.toString()
            if (socket.id==0) {
                    Socket[1].write(data);
            } else if (socket.id==1) {
                    Socket[0].write(data);
            }
            console.log(socket);
            console.log(data.toString());
    });

})
relay.listen(process.env['app_port']||8080);

It works fine when run locally, however when I put it onto a Nodester development server, I am unable to connect by using telnet zapcs.nodester.com 18007 (it is hosted under the name zapcs, and the given port is 18007). The Relay Started is logged, but nothing after that, and no connection. Any ideas on why this would be?

~


Source: (StackOverflow)

Can not create nodester account

I want to register on http://nodester.com/. I got my coupon, registered on site, installed nodester (npm install nodester-cli -g)

and user setup command (nodester user setup gio.beri@gmail.com pass***) gives me error:

nodester info verifying credentials

/usr/local/lib/node_modules/nodester-cli/node_modules/nodester-api/node_modules/request/vendor/cookie/index.js:45 : url.parse(req.url).pathname; ^ TypeError: Cannot read property 'url' of undefined at new Cookie (/usr/local/lib/node_modules/nodester-cli/node_modules/nodester-api/node_modules/request/vendor/cookie/index.js:45:20) at /usr/local/lib/node_modules/nodester-cli/node_modules/nodester-api/node_modules/request/main.js:432:33 at Array.forEach (native) at Request. (/usr/local/lib/node_modules/nodester-cli/node_modules/nodester-api/node_modules/request/main.js:426:46) at Request.emit (events.js:64:17) at IncomingMessage. (/usr/local/lib/node_modules/nodester-cli/node_modules/nodester-api/node_modules/request/main.js:391:16) at IncomingMessage.emit (events.js:81:20) at HTTPParser.onMessageComplete (http.js:133:23) at CleartextStream.ondata (http.js:1231:22) at CleartextStream._push (tls.js:303:27)

Can anyone suggest anything?

EDIT: I think that problem is in my password. what must me there coupon???


Source: (StackOverflow)

Lost in Nodester Installation

I am trying to install my own version of Nodester. I have tried on Ubuntu 12.04 LTS and now with CentOS. I am not the most skilled Linux user (~2 months use) so I am at a loss at this point.

The instructions are located at https://github.com/nodester/nodester/wiki/Install-nodester#wiki-a. They ask you to "export paths (to make npm work)" with the lines necessary to accomplish this.

cd ~
echo -e "root = ~/.node_libraries\nmanroot = ~/local/share/man\nbinroot = ~/bin" > ~/.npmrc
echo -e "export PATH=3d9c7cfd35d3628e0aa233dec9ce9a44d2231afcquot;\${PATH}:~/bin3d9c7cfd35d3628e0aa233dec9ce9a44d2231afcquot;;" >> ~/.bashrc
source ~/.bashrc

I can accomplish all of this until I get to the source ~/.bashrc line. When I run that, I get the following:

[root@MYSERVER ~]# source ~/.bashrc
-bash: /root/.bashrc: line 13: syntax error near unexpected token ';;'
-bash: /root/.bashrc: line 13: 'export PATH=3d9c7cfd35d3628e0aa233dec9ce9a44d2231afcquot;${PATH}:~/bin3d9c7cfd35d3628e0aa233dec9ce9a44d2231afcquot;;

I have tried changing the quot; to " and that didn't help. I tried changing quot; to colons and that didn't help. I also removed that and it didn't help (I am sure many of you at this point are probably wondering why I would even try those things). Does anyone have any insight as to what I need to do to get this to run properly?


Source: (StackOverflow)

Problems with expressjs on Nodester

i just started using nodester as nodejs application paas and i stepped into a couple of problems.

Let me clarify that my local machine runs node 0.7 while on nodester i'm using node 0.6.17

The following code is inside my server.js file, executed by the platform:

app.get('/static', function(req,res) {
  res.sendfile('views/myFile.html',function(error){
    if(err)
      res.send('An error has occurred');
  });
});
app.get('/', function(req,res){
  res.render('index.jade');
});

The rest of the code is the code generated by Express.js in particular the configuration is

app.set('views', __dirname + '/views');
  app.use(express.static(__dirname + '/public'));
  app.set('view engine', 'jade');
  app.set('view options', {layout: 'layout.jade'}); //added by me but with no results

If i run this configuration in my local machine, everything works fine, the '/' route, perfectly sends the index.jade view inside the proper layout.jade view. The '/static' route, sends index.html without problems.

But if i run this code on nodester (after editing package.json and asking for node 0.6) i get different results:

  1. The '/' route doesn't render the layout.jade, but only index.jade. This is pretty weird, since i just edited the layout.jade file, generated by express!

  2. The '/static' route just throws an error, that i can catch with the callback. So the html file is not sent.

Where am i wrong? i am probably missing something.. any ideas?


Source: (StackOverflow)

Nodester: "failed-to-start" new app

Using nodester, I'm having issues starting a new app. I've created it but the state is: failed-to-start, and it doesn't let me change anything. Anybody have an familiarity with this?

enter image description here

enter image description here


Source: (StackOverflow)

How to upgrade Node.js on Nodester

I'm trying to upgrade to Node v0.6.17. I followed the instructions in this post:

http://blog.nodester.com/

but I'm still running version 0.4.9

Any suggestions?

Thanks


Source: (StackOverflow)

Faye websockets works?

I have created a hello world application as described on faye on both heroku and nodester (nodejs app) and heroku-rack-app. but whenever I try connect to any of above mentioed faye-serer using websockets, it always fails. Ajax polling || jsonp polling is working fine. but websockets never worked for me. Can anyone help me to understand a reason for this problem ?


Source: (StackOverflow)