Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
updated readme
  • Loading branch information
chrismatthieu committed Jan 31, 2011
1 parent c1c790c commit 05334ba
Show file tree
Hide file tree
Showing 3 changed files with 122 additions and 2 deletions.
114 changes: 114 additions & 0 deletions README.rdoc
@@ -0,0 +1,114 @@
= Nodester (http://nodester.com) = Open Source Node.JS Hosting Platform with a RESTful API and CLI

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.

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

Please see install.txt for setup instructions (https://github.com/nodester/nodester/blob/master/install.txt)

== RESTful API Documentation

COUPON
/coupon - creates coupon request for early access (pass in email) - <b>Note: This resource does not use base api url
curl -X POST -d "email=chris@nodester.com" http://localhost:8080/coupon

STATUS
/status - returns status of the platform and number of nodejs apps running
// curl http://api.localhost:8080/status

USER
/user - creates user account (pass in user and password and email) - Note: This resource does not use the api subdomain
curl -X POST -d "user=testuser&password=123&email=chris@nodester.com" http://localhost:8080/user

/user - delete user account (requires basic auth)
curl -X DELETE -u "testuser:123" http://api.localhost:8080/user

APP
/app - create nodejs app for hosting (requires basic auth and returns the port address required for use along with a git repo to push to)
curl -X POST -u "testuser:123" -d "appname=a&start=hello.js" http://api.localhost:8080/app

Get information about an app
curl -u "testuser:123" http://api.localhost:8080/app/a

Start or stop an app using running=true|false
curl -X POST -u "testuser:123" -d "appname=a&running=true" http://api.localhost:8080/app
curl -X POST -u "testuser:123" -d "appname=a&running=false" http://api.localhost:8080/app

/app - update nodejs app for hosting (requires basic auth, appname, and starting page and returns the port address required for use along with a git repo to push to)
curl -X PUT -u "testuser:123" -d "appname=a&start=hello1.js" http://api.localhost:8080/app

/app - delete nodejs app (requires basic auth and appname)
curl -X DELETE -u "testuser:123" -d "appname=test" http://api.localhost:8080/app

/app - get nodejs app info (requires basic auth and appname)
curl -u "testuser:123" http://api.localhost:8080/app/appname

/apps - get all your apps info (requires basic auth)
curl -u "testuser:123" http://api.localhost:8080/apps

/appnpm - install, update and uninstall npm packages to your application
curl -X POST -u "testuser:123" -d "appname=a&action=install&package=express" http://api.localhost:8080/appnpm
curl -X POST -u "testuser:123" -d "appname=a&action=update&package=express" http://api.nodester.com/appnpm
curl -X POST -u "testuser:123" -d "appname=a&action=uninstall&package=express" http://api.nodester.com/appnpm

== CLI Documentation

Installation of our Command Line Interface is simple using NPM.

npm install nodester-cli

Operations are as simple as nodester <command> <param1> <param2>. Here is a list of the commands available today:

nodester coupon <email address>
nodester user create <username> <password> <email address> <file containing ssh public key> <coupon code>
nodester user setup <username> <password>

The commands below require you to have run 'user setup' before/
nodester user setpass <new password>

You should run user setup after running setpass:
nodester user setkey <file containing ssh public key>
nodester apps list
nodester app create <app-name> <initial js file>
nodester app info <app-name>
nodester app start <app-name>
nodester app restart <app-name>
nodester app stop <app-name>
nodester appnpm install <app-name> <package name>
nodester appnpm upgrade <app-name> <package name>
nodester appnpm uninstall <app-name> <package name>

== 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

http://localhost:80 = Homepage
http://a.localhost:80 = Runs app associated with subdomain a on couch-configured port
http://b.localhost:80 = Runs app associated with subdomain b on couch-configured port
http://chris:123@api.localhost:80/status = API to list status of all node apps

== Todos

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

* Add ability to control number of instances
* Add SSL support
* Add logging
* Setup public AMI running Nodester
* Ability to start app with additional instances (dynos)

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

== Core Team Members

@ChrisMatthieu (http://twitter.com/chrismatthieu)
@DanBUK (http://twitter.com/danbuk)
@Marcosvm (http://twitter.com/marcosvm)

If this project inspires you, please feel free to help out by forking this project and sending me pull requests!

==License

Apache 2 - Have fun! :)
File renamed without changes.
10 changes: 8 additions & 2 deletions public/index.html
Expand Up @@ -131,15 +131,21 @@ <h2>Welcome to Nodester!</h2>
<h3>How do I sign-up? Request a coupon via cURL and get on our list!</h3> <h3>How do I sign-up? Request a coupon via cURL and get on our list!</h3>
<code>curl -X POST -d "email=your_address@gmail.com" http://nodester.com/coupon</code> <code>curl -X POST -d "email=your_address@gmail.com" http://nodester.com/coupon</code>


<h3>Deployment is Easy - Create & Git Push!</h3> <h3>Deployment is Easy - Create, Git Push, & Run!</h3>
<ol> <ol>
<li> curl -X POST -u "testuser:123" -d "appname=myapp&start=hello.js" http://api.nodester.com/app</li> <li> curl -X POST -u "testuser:123" -d "appname=myapp&start=hello.js" http://api.nodester.com/app</li>
<li> git remote add nodester the_url_returned_by_our_api</li> <li> git remote add nodester the_url_returned_by_our_api</li>
<li> git push nodester master</li> <li> git push nodester master</li>
<li> NPM modules? <br/>curl -X POST -u "testuser:123" -d "appname=myapp&action=install&package=express" http://api.nodester.com/appnpm</li>
<li> curl -X PUT -u "testuser:123" -d "appname=myapp&running=true" http://api.nodester.com/app</li> <li> curl -X PUT -u "testuser:123" -d "appname=myapp&running=true" http://api.nodester.com/app</li>
</ol> </ol>
<code><b>Visit your app at http://myapp.nodester.com</b></code> <code><b>Visit your app at http://myapp.nodester.com</b></code>
<i>Don't worry you only need to start the application once, the next time you push it will automatically pick up the changes. You can always stop it as well.</i> <p><i>Don't worry you only need to start the application once, the next time you push it will automatically pick up the changes. You can always stop it as well.</i></p>
<h3>Check out our new Command Line Interface (CLI)!</h3>
<ol>
<li>npm install nodester-cli</li>
<li>type "nodester" to see a list of command uses</li>
</ol>
</div> </div>
</div> </div>
</div> </div>
Expand Down

0 comments on commit 05334ba

Please sign in to comment.