Git Product home page Git Product logo

nodester's Introduction

Nodester is an Open Source Node.JS Hosting PaaS with a CLI and RESTful API

Nodester is a free and open source Node.JS hosting platform and service for managing multi-tenant hosted NodeJS apps. It consists of an RESTful API that allows developers to create and manage NodeJS apps online as well as a command line interface to simply steps instead of using cURL. NodeJS apps names are assigned as subdomains that proxy to ports with an assigned addresses. Git is used to push updates to Nodester and instances (dynos) are launched using post-receive hooks so that they run until you stop them.

Demo

Give our platform a spin at http://nodester.com

Watch our video on how-to build and deploy a Node.JS application to Nodester in only 39 seconds! http://youtu.be/jwsP1Ejv-_w

Request a free hosting coupon today

  curl -X POST -d "[email protected]" http://nodester.com/coupon

Installing the Nodester CLI

  npm install nodester-cli -g

CLI and RESTful API Documentation

Installing Nodester on Amazon EC2, Rackspace, GoGrid, or your own datacenter services

Please read the wiki for setup instructions

Testing Locally

Subdomains can be tested locally by editing /etc/hosts like this: 127.0.0.1 localhost a.localhost b.localhost c.localhost save etc/hosts and flush DNS like this: sudo dscacheutil -flushcache

Todos

We are always looking for areas to improve Nodester! Here are a few of the big ideas on our list

  • Setup public AMI running Nodester
  • Write an install.js script and npm installer module
  • Ability to start app with additional instances (dynos)
  • Horizontal scaling

Feel free to suggest improvements at https://github.com/nodester/nodester/issues

Core Team Members

If this project inspires you, please feel free to help out by forking this project and sending us pull requests! \m/ http://github.com/nodester

Need Help?

nodester's People

Contributors

akumpf avatar alejandro avatar chrismatthieu avatar ckknight avatar danbuk avatar davglass avatar fgnass avatar funkytek avatar kenjitakahashi avatar marcosvm avatar michealbenedict avatar mmirate avatar nodester avatar roskoff avatar skierkowski avatar tenzer avatar yawnt avatar yocontra avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nodester's Issues

Problem when using require()

When I try to require a JS module that has been included with my project, like this:

var utils = require('./utils.js');

where "utils.js" is a JS file in the same project root directory as server.js, I get this error in my logs:

{ stack: [Getter/Setter],
arguments: undefined,
type: undefined,
message: 'Cannot find module './utils.js'' }{ stack: [Getter/Setter],
arguments: undefined,
type: undefined,
message: 'Cannot find module './utils.js'' }

The same error is given with various versions of the same situation (with or without .js, module in a folder with the require() statement updated accordingly).

I guess I should also note that this is an otherwise functioning app. Without the additional require(), the app has been deployed and runs fine on nodester.

First app install will end up with undefined in repo

Due to the derivation route of the repo_id from nextport table, the very first app that is created will end up with a wonky repo_id. Like

/var/nodester/hosted_apps/dan/undefined.git

Should probably move to some guid generator for repo_ids.

Newly created app fails when accessed

When accessing http://mynodesterapp3.nodester.com/ it outputs the following message:

An error has occurred: {"message":"ECONNREFUSED, Connection refused","stack":"Error: ECONNREFUSED, Connection refused\n    at IOWatcher.callback (net:870:22)\n    at node.js:773:9","errno":111,"syscall":"connect"}

I have not modified the hello.js, simply init'd and started.

Problems with [email protected] install using npm

I've tried to create a new app which uses express, and after
$ nodester app npm install express
[...]
nodester npm info build Success: [email protected]
nodester npm info build Success: [email protected]
nodester npm info build Success: [email protected]
nodester npm ok
and pushing the default sample express app on master, the app refuse to start due to a path problem
$ nodester app logs
nodester info Checking config..
nodester info Nodester wrapped script starting (24794) at Wed, 02 Mar 2011 21:26:23 GMT
nodester info Error: Cannot find module 'express'
nodester info at Function._resolveFilename (module.js:289:11)
nodester info at Function._load (module.js:241:25)
nodester info at Function.require (module.js:317:19)
nodester info at /home/ec2-user/nodester/scripts/launch_chrooted_app.js:111:26
nodester info at tops.js:1:15
nodester info at /home/ec2-user/nodester/scripts/launch_chrooted_app.js:153:20
nodester info at [object Object]. (fs.js:86:5)
nodester info at [object Object].emit (events.js:39:17)
nodester info at afterRead (fs.js:840:12){ stack: [Getter/Setter],
nodester info arguments: undefined,
nodester info type: undefined,
nodester info message: 'Cannot find module 'express'' }
I haved installed several other npm packages on this app and I have no path problems
Beside that I already have one instance on express running on another app fine...

nodester app delete ?

I was thinking that it may be handy to be able to delete a created app.
Something like :
$ nodester app delete [app]

Add User PUT

People are requesting to change their password and rsa key after creating their account.

Delete && nodester app init ERROR

I had to make the application newly, and executed the following commands.

1.curl -X DELETE -u "testuser:testpwd" -d "appname=a" http://api.nodester.com/app

2.rm -rf a

3.nodester app create a app.js
nodester info Checking config..
nodester info creating app: a app.js
nodester info successfully created app a to will run on port from app.js
nodester info run nodester app init a to setup this app.

4.nodester app init a
nodester info Checking config..
nodester info initializing git repo for a into folder a
nodester info cloning the repo git clone [email protected]:/home/ec2-user/hosted_apps/xxxxx.git a
nodester info writing app data to config
nodester ERRO false

Debug /appnpm handler

It doesn't seem to be 100% reliable.
Sometimes it does install, sometimes not.

I haven't worked out a reproducible case yet though :(

Apps on Nodester are not starting.

I walked through our example on the home page of creating an app on nodester and pushing it and starting it. All API calls returned success. Git repo, app directory, and database look fine.

App is not running. Check out http://b.nodester.com
/hosted_apps/topher/106-b7efb3592c125951a411e5e84801966d

last commit broke use of socket.io

4eb4d6b

By escaping strings here. I can no longer load the npm package for socket.io.

allow me to elaborate:

nodester appnpm install "socket.io"
stdout:
stderr: npm info it worked if it ends with ok
npm info using [email protected]
npm info using [email protected]
npm ERR! Error: 404 Not Found: socketio
npm ERR! at IncomingMessage. (/home/ec2-user/.node_libraries/.npm/npm/0.2.16/package/lib/utils/registry/request.js:150:16)
npm ERR! at IncomingMessage.emit (events:48:20)
npm ERR! at HTTPParser.onMessageComplete (http:107:23)
npm ERR! at Client.onData as ondata
npm ERR! at IOWatcher.callback (net:494:29)
npm ERR! at node.js:773:9
npm ERR! 404
npm ERR! 404 Looks like 'socketio' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it.
npm ERR! 404 Note that you can also install from a tarball or local folder.
npm ERR! 404
npm not ok

"nodester app init [appname]" fails

I still have been able to use nodester :(

$ nodester app init sometestapp
nodester info Checking config..
nodester info initializing git repo for sometestapp into folder sometestapp
nodester info cloning the repo git clone [email protected]:/home/ec2-user/ho
sted_apps/martypdx/440-a0004c6c9ab39f06d57c50f8d77d4333.git sometestapp
Enter passphrase for key '/c/Users/marty.nelson/Documents/Marty/.ssh/id_rsa':
nodester info writing app data to config
Enter passphrase for key '/c/Users/marty.nelson/Documents/Marty/.ssh/id_rsa':
nodester ERRO false

I tried "nodester user setkey " both with the file as-is, and by using "cat ~/.ssh/id_rsa.pub | sed s/'+'/'%2B'/g | pbcopy" to replace '+' (btw there's a typo on help page, the last | should be a >).

Same error either way. Passphrase is correct.

Issues with 'app init' under Ubuntu (Bad file descriptor)

This might be a problem on my end, but there seems to be a problem with 'app init'. It's failing to create the folder.

cjoudrey@duo:~/Web$ nodester app init mynodesterapp3 ./mynodesterapp3

fs.js:184
  return binding.open(path, stringToFlags(flags), mode);
                 ^
Error: EBADF, Bad file descriptor './mynodesterapp3/.nodester.appconfig'
    at Object.openSync (fs.js:184:18)
    at Object.writeFileSync (fs.js:436:15)
    at /usr/local/lib/node/.npm/nodester-cli/0.1.7/package/bin/nodester.js:274:16
    at ChildProcess.exithandler (child_process.js:85:7)
    at ChildProcess.emit (events.js:45:17)
    at ChildProcess.onexit (child_process.js:171:12)

I tried creating the folder manually, but it still crashes at the same spot with an extra error message 'file exists'.

Delivery of static files fail using paperboy

I'm using paperboy (https://github.com/felixge/node-paperboy/) as static file server.
Somehow delivery of static content fails.

Example app:

var http = require('http'),
    paperboy = require('paperboy'),
    util = require('util');

var SERVER_PORT    = '8702',
    SERVER_PUBLIC  = __dirname + '/public';


http.createServer(function(req, res) {
paperboy
    .deliver(SERVER_PUBLIC, req, res)
    .addHeader('Expires', 300)
    .addHeader('X-PaperRoute', 'Node')
    .error(function(statCode, msg) {
        console.log(statCode, req.url, req.ip, msg);
    })
    .otherwise(function(err) {
        res.writeHead(404, {'Content-Type': 'text/plain'});
        res.end("Error 404: File not found");
        console.log(404, req.url, req.ip, err);
    });

}).listen(SERVER_PORT);
util.puts('Server running at port ' + SERVER_PORT);

Put a file in /public/ and try to request it. The above app works fine on my local node installation (0.4.1) but seems to fail on nodester. In issue #49 (https://github.com/nodester/nodester/issues#issue/49) it's reported that require('./lib/myfile.js') fails. Guess what's the first line of paperboy's package โ€ฆ ;)

Git pushes not updating app.

A couple days ago git pushes stopped updating my app.
I created a new one to test that this was the case, and it also does not apply changes when I git push.
stoping and starting the app after pushing also does not trigger an update.

I have done some sleuthing and there is a clue.

The git push command response includes this line
remote: kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]

which indicates that kill is not receiving a pid.

The .app.pid file is only written in one place /scripts/launch_chrooted_apps.js
And it was changed two days ago, roughly when pushes stopped being applied.

0b39a10

Error: EBADF, Bad file descriptor 'suncity/.nodester.appconfig'

I execute nodester app suncity init, it return following error. How to resolve it.
nodester info writing app data to config

node.js:116
throw e; // process.nextTick error, or 'error' event on first tick
^
WideCharToMultiByte:
Error: EBADF, Bad file descriptor 'suncity/.nodester.appconfig'

Important bug with the register form

Hey guys,

I just tried registering for the beta. I managed to create a user but after testing with 3 accounts I noticed a pretty big issue with the register form.

I added the $ character to my password and it seems to be causing problems. It keeps saying the password is invalid.

I tried re-creating another account with the same password minus the $ character and it works fine.

I'm guessing this might be an encoding issue like the problem you are having with the RSA key (i.e. replace + with %2b).

Thanks!

'nodester app init x' consistently fails

Marty.Nelson@Laptop-Mnelson7 ~
$ nodester app create sometestapp some.js
nodester info Checking config..
nodester info creating app: sometestapp some.js
nodester info successfully created app sometestapp to will run on port from som
e.js
nodester info run nodester app init sometestapp to setup this app.

Marty.Nelson@Laptop-Mnelson7 ~
$ nodester app init sometestapp ./sometestapp
nodester info Checking config..
nodester info initializing git repo for sometestapp into folder ./sometestapp
nodester info cloning the repo git clone [email protected]:/home/ec2-user/ho
sted_apps/martypdx/440-a0004c6c9ab39f06d57c50f8d77d4333.git ./sometestapp
nodester info writing app data to config

node.js:116
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: EBADF, Bad file descriptor 'sometestapp/.nodester.appconfig'
at Object.openSync (fs.js:197:18)
at Object.writeFileSync (fs.js:449:15)
at Object.writeApp (/usr/local/lib/node/.npm/nodester-cli/0.2.3/package/lib/
config.js:46:8)
at /usr/local/lib/node/.npm/nodester-cli/0.2.3/package/lib/app.js:172:37
at ChildProcess.exithandler (child_process.js:85:7)
at ChildProcess.emit (events.js:45:17)
at Socket. (child_process.js:151:12)
at Socket.emit (events.js:42:17)
at Array. (net.js:800:12)
at EventEmitter._tickCallback (node.js:108:26)

Marty.Nelson@Laptop-Mnelson7 ~
$ nodester app init sometestapp sometestapp
nodester info Checking config..
nodester info initializing git repo for sometestapp into folder sometestapp
nodester info cloning the repo git clone [email protected]:/home/ec2-user/ho
sted_apps/martypdx/440-a0004c6c9ab39f06d57c50f8d77d4333.git sometestapp
nodester info writing app data to config

fs.js:197
return binding.open(path, stringToFlags(flags), mode);
^
Error: EBADF, Bad file descriptor 'sometestapp/.nodester.appconfig'
at Object.openSync (fs.js:197:18)
at Object.writeFileSync (fs.js:449:15)
at Object.writeApp (/usr/local/lib/node/.npm/nodester-cli/0.2.3/package/lib/
config.js:46:8)
at /usr/local/lib/node/.npm/nodester-cli/0.2.3/package/lib/app.js:172:37
at ChildProcess.exithandler (child_process.js:85:7)
at ChildProcess.emit (events.js:45:17)
at ChildProcess.onexit (child_process.js:171:12)

Marty.Nelson@Laptop-Mnelson7 ~
$

Incorporate hosted app PORT and IPADDRESS into startup of app.

In order to make it easier to scale apps we need to move to using variables defined from the app to hosted app to allow for different node's running on multiple machines.

Therefore rather than the current:
.listen(8001);
We have
.listen(process.env['APPPORT'], process.env['APPIPADDRESS']
Although I might prefer:
.listen(APPPORT, APPIPADDRESS)
But I'm still undecided; comments welcome!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.