Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 78364dba90
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 381 lines (314 sloc) 18.1 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Nodester | Open Source Node.JS Hosting Platform</title>
<link rel="stylesheet" href="styles.css" type="text/css" />
<!--
ablaze, a free CSS web template by spyka Webmaster (www.spyka.net)

Download: http://www.spyka.net/web-templates/ablaze/

License: Creative Commons Attribution
//-->
<script type="text/javascript" src="/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="/thickbox.js"></script>

<link rel="stylesheet" href="/thickbox.css" type="text/css" />

<script type="text/javascript">

 var _gaq = _gaq || [];
 _gaq.push(['_setAccount', 'UA-119008-21']);
 _gaq.push(['_trackPageview']);

 (function() {
   var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
   ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
   var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
 })();

</script>
</head>

<body class="small-header">
<!-- <a href="http://github.com/nodester"><img id="ribbon" src="images/forkme_right_white_ffffff.png" /></a> -->

<div id="hiddenModalContent" style="display:none">
<h3>Did you get your coupon code? <a href="#" onclick="tb_remove()">I wish!</a></p></h3>
<fieldset>

<form action="/user" method="post">
<p><label for="name">Coupon:</label>
<input type="password" name="coupon" id="coupon" value="" /><br />
<label for="name">Username:</label>
<input type="text" name="user" id="user" value="" /><br />
<label for="name">Password:</label>
<input type="password" name="password" id="password" value="" /> (only alphanumeric allowed)<br />
<span id="passwordError" style="display:none"><span style="color:red">Password is limited to alphanumerics - no symbols allowed.</span><br/></span>
<label for="email">Email:</label>
<input type="text" name="email" id="email" value="" /><br />
<label for="rsakey">Public RSA Key:</label>
<textarea cols="60" rows="8" name="rsakey" id="rsakey">
Copy & Paste RSA key from command line:
"cat ~/.ssh/id_rsa.pub | pbcopy"</textarea><br />
<input type="submit" name="send" class="formbutton" value="Send" />
</form>
<script>
$(function() {
$('form').submit( function() {
return validatePass( $('#password'), true, $('#passwordError') );
});

$('#password').blur( function() {
validatePass( $(this), true, $('#passwordError') );
});

function validatePass(tb,required,msg) {
var $tb = $(tb);
if ($tb.val().match(/[~!@#$%^&*()_+=-]/) != null) {
$(msg).show();
return false;
}
$(msg).hide();
return true;
}
});
</script>
</fieldset>

</div>

<div id="wrapper">
<div id="sitename">
<h1><a href="/"><img src="/images/nodesterrocketlogo.jpg" height="70"></a></h1>
</div>
       <div id="nav">
<ul>
<li><a href="/"><span>Home</span></a></li>
                <li><a href="#TB_inline?height=400&width=600&inlineId=hiddenModalContent&modal=true" class="thickbox"><span>Register</span></a></li>
                <li class="selected"><a href="/api.html"><span>API</span></a></li>
                <li><a href="http://irc.nodester.com"><span>IRC</span></a></li>
                <li><a href="http://nodester.tumblr.com/"><span>Blog</span></a></li>
                <li><a href="http://github.com/nodester"><span>GitHub</span></a></li>
</ul>
</div>

<div id="header" class="clear">

<!-- <img src="images/warriors.gif" align="left"> -->
<h2><center>Node.JS&trade; Open Source Hosting Platform!</center></h2><br/>
</div>
<div id="body" class="clear">
<div id="sidebar" class="column-left">
<ul>
                 <li>
<h4>API</h4>
                        <ul class="blocklist">
                            <!-- <li class="selected-item"><a href="index.html">Home</a></li> -->
                            <li><a href="#couponapi">Coupon Request</a></li>
                            <li><a href="#status">API Status</a></li>
                            <li><a href="#userapi">User Resource</a></li>
                            <li><a href="#app">App Resource</a></li>
                            <li><a href="#env">Env Resource</a></li>
                            <li><a href="#appnpm">NPM Resource</a></li>
                            <li><a href="#appdomains">App Domains Resource</a></li>
                            <li><a href="#clicommands">CLI Commands</a></li>
                            <li><a href="#git">Git Resources</a></li>
                        </ul>

</li>
<li>
<h4>Technology</h4>
<ul>
<li><a href="http://nodejs.org" title="Node.JS">Node.JS</a></li>
<li><a href="http://npmjs.org/" title="Node Package Manager">Node Package Manager</a></li>
<li><a href="http://git-scm.com/" title="Git version control">Git Version Control</a></li>
<li><a href="http://www.couchone.com/" title="CouchOne DB Hosting">CouchOne DB Hosting</a></li>
<li><a href="http://aws.amazon.com/" title="Amazon Web Services">Amazon Web Services</a></li>
<br/>
<li><a href="https://github.com/nodejitsu/node-http-proxy" title="Node HTTP Proxy">Node HTTP Proxy</a></li>
<li><a href="https://github.com/remy/nodemon" title="Nodemon">Nodemon</a></li>
<li><a href="https://github.com/creationix/couch-client" title="Couch Client">Couch Client</a></li>
<li><a href="https://github.com/visionmedia/express" title="Express">Express</a></li>
<li><a href="http://jquery.com/" title="jQuery">jQuery</a></li>


</ul>
</li>
</ul>
</div>
<div id="content" class="column-right">
                <h2>REST API</h2>
                <p>We do not currently have a full featured website as we are focusing on the API and the service. We are currently running version of Node v.0.4.7 and we support Node.JS sandboxing of your apps which means that you can install your own NPM modules using our NPM API! Git is required to push your updates to Nodester.</p>

<a name="couponapi"></a>
<h3>COUPON</h3>
<p><b>Request Coupon :: POST</b>
<br/>Base URL: http://nodester.com</p>
<code>/coupon - creates coupon request for early access (pass in email)<br/><br/>
curl -X POST -d "email=your_address@gmail.com" http://nodester.com/coupon</code>

<a name="status"></a>
<h3>STATUS</h3>
<p><b>Get Status :: GET</b>
<br/>Base URL: http://nodester.com</p>
<code>/status - Returns platform status and number of apps running<br/><br/>
curl http://nodester.com/status</code>

<a name="userapi"></a>
<h3>USER</h3>
<p><b>Register User :: POST (Coupon is required.)</b>
<br/>Base URL: http://nodester.com</p>
<code>/user - creates user account (pass in user and password and email and id_rsa.pub string) <i>Ensure that all + in the ssh key are substituted for their %2B counter parts, else your key will break. Run this on your command line to copy your RSA string and swap out the plus signs: "cat ~/.ssh/id_rsa.pub | sed s/'+'/'%2B'/g | pbcopy"</i><br/><br/>
curl -X POST -d "coupon=mycoupon&user=testuser&password=123&email=chris@nodester.com&rsakey=ssh-rsa AAAAB3NzaC1yc..." http://nodester.com/user</code>

<p><b>Update User :: PUT</b>
<br/>Base URL: http://api.nodester.com</p>
<code>/user - update user account (pass in password and/or RSA key - "cat ~/.ssh/id_rsa.pub | sed s/'+'/'%2B'/g | pbcopy")<br/> <br/>
curl -X PUT -u "testuser:123" -d "password=test" http://api.nodester.com/user<br/>
curl -X PUT -u "testuser:123" -d "rsakey=1234567" http://api.nodester.com/user</code>

<p><b>Delete User :: DELETE</b>
<br/>Base URL: http://api.nodester.com</p>
<code>/user - delete user account (requires basic auth)<br/> <br/>
curl -X DELETE -u "testuser:123" http://api.nodester.com/user</code>

<a name="app"></a>
<h3>APP</h3>
<p><b>Create Application :: POST</b>
<br/>Base URL: http://api.nodester.com</p>

<code>/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)<br/><br/>
curl -X POST -u "testuser:123" -d "appname=a&start=hello.js" http://api.nodester.com/app</code>

<p><b>Change Application :: PUT</b>
<br/>Base URL: http://api.nodester.com</p>

<code>/app - update starting app name (requires basic auth, appname, and starting page and returns the port address required for use along with a git repo to push to and running status of the app)<br/><br/>
curl -X PUT -u "testuser:123" -d "appname=a&start=hello1.js" http://api.nodester.com/app</code>
<p>- or - </p>
<code>/app - start and stop your hosted nodejs app (requires basic auth, appname, and running=true|false and returns the port address required for use along with a git repo to push to)<br/><br/>
curl -X PUT -u "testuser:123" -d "appname=a&running=true" http://api.nodester.com/app</code>

<p><b>Delete Application :: DELETE</b>
<br/>Base URL: http://api.nodester.com</p>

<code>/app - delete nodejs app (requires basic auth and appname)<br/> <br/>
curl -X DELETE -u "testuser:123" -d "appname=test" http://api.nodester.com/app</code>

<p><b>Application Information :: GET</b>
<br/>Base URL: http://api.nodester.com</p>

<code>/app/<appname> - get nodejs app info (requires basic auth and appname)<br/> <br/>
curl -u "testuser:123" http://api.nodester.com/app/appname</code>

<a name="env"></a>
<h3>ENV</h3>
<p><b>Create/Update Environment :: PUT</b>
<br/>Base URL: http://api.nodester.com</p>

<code>/env - create/update environment key/value pair (requires basic auth, appname, and environment key and value)<br/><br/>
curl -X PUT -u "testuser:123" -d "appname=a&key=color&value=blue" http://api.nodester.com/env</code>

<p><b>Delete Environment :: DELETE</b>
<br/>Base URL: http://api.nodester.com</p>

<code>/env - delete environment key/value pair (requires basic auth, appname, and environment key)<br/> <br/>
curl -X DELETE -u "testuser:123" -d "appname=test&key=color" http://api.nodester.com/env</code>

<p><b>Environment Information :: GET</b>
<br/>Base URL: http://api.nodester.com</p>

<code>/env - get environment info (requires basic auth, appname, and environment key)<br/> <br/>
curl -u "testuser:123" -d "appname=test&key=color" http://api.nodester.com/env</code>

<h3>APPS</h3>
<p><b>All Applications Information :: GET</b>
<br/>Base URL: http://api.nodester.com</p>
<code>/apps<appname> - get all nodejs app info(requires basic auth)<br/> <br/>
curl -u "testuser:123" http://api.nodester.com/apps</code>

<a name="appnpm"></a>
<h3>NPM</h3>
<p><b>Install/Upgrade/Uninstall NPM Packages :: POST</b>
<br/>Base URL: http://api.nodester.com</p>
<code>/npm - Allows you to manage the NPM packages for an application.<br/><br/>
curl -X POST -u "testuser:123" -d "appname=a&action=install&package=express" http://api.nodester.com/npm<br/><br/>
curl -X POST -u "testuser:123" -d "appname=a&action=update&package=express" http://api.nodester.com/npm<br/><br/>
curl -X POST -u "testuser:123" -d "appname=a&action=uninstall&package=express" http://api.nodester.com/npm</code></p>

<a name="appdomains"></a>
<h3>APPDOMAINS - Add DNS A Record for 50.16.203.53</h3>
<p><b>Create Application Domain :: POST</b>
<br/>Base URL: http://api.nodester.com</p>

<code>/appdomains - create app domain for hosting example.com (requires basic auth)<br/><br/>
curl -X POST -u "testuser:123" -d "appname=test&domain=example.com" http://api.nodester.com/appdomains</code>

<p><b>Delete Application Domain :: DELETE</b>
<br/>Base URL: http://api.nodester.com</p>

<code>/appdomains - delete app domain for hosting example.com (requires basic auth)<br/> <br/>
curl -X DELETE -u "testuser:123" -d "appname=test&domain=example.com" http://api.nodester.com/appdomains</code>

<p><b>Application Domain Information :: GET</b>
<br/>Base URL: http://api.nodester.com</p>

<code>/appdomains - get list of your domains (requires basic auth)<br/> <br/>
curl -u "testuser:123" http://api.nodester.com/appdomains</code>


<a name="clicommands"></a>
<h3>CLI Commands</h3>
<p>You can install our Command Line Interface by running "npm install nodester-cli"</p>
<code>
nodester &lt;command&gt; &lt;param1&gt; &lt;param2&gt;<br/><br/>

Commands are:<br/>
nodester coupon &lt;email address&gt;<br/>
nodester user create &lt;username&gt; &lt;password&gt; &lt;email address&gt; &lt;file containing ssh public key&gt; &lt;coupon code&gt;<br/>
nodester user setup &lt;username&gt; &lt;password&gt;<br/><br/>

The commands below require you to have run 'user setup' before/<br/>
nodester user setpass &lt;new password&gt;<br/><br/>
You should run user setup after running setpass.<br/>
nodester user setkey &lt;file containing ssh public key&gt;<br/>
nodester apps list<br/>
nodester app create &lt;app-name&gt; &lt;initial js file&gt;<br/>
nodester app info &lt;app-name&gt;<br/>
nodester app logs &lt;app-name&gt;<br/>
nodester app start &lt;app-name&gt;<br/>
nodester app restart &lt;app-name&gt;<br/>
nodester app stop &lt;app-name&gt;<br/>
nodester app gitreset &lt;app-name&gt;<br/>
nodester npm install &lt;app-name&gt; &lt;package name&gt;<br/>
nodester npm upgrade &lt;app-name&gt; &lt;package name&gt;<br/>
nodester npm uninstall &lt;app-name&gt; &lt;package name&gt;<br/>
nodester appdomain add &lt;app-name&gt; &lt;domain-name&gt;<br/>
nodester appdomain delete &lt;app-name&gt; &lt;domain-name&gt;<br/>
nodester appdomains<br/>


</code>

<a name="git"></a>
<h3>GIT</h3>
<p>Deploying and updating your Node.js application is simple.</p>
<p><b>curl -X POST -u "testuser:123" -d "appname=myapp&start=hello.js" http://api.nodester.com/app</b></p>
<p>Upon creating or changing your application via our API, you will receive a Git reop URL from our API response. Add a Nodester remote to your project as follows:</p>
<p><b>git remote add nodester the_url_returned_by_our_api</b></p>
<p>Finally push your updates to your new Nodester environment as follows:</p>
<p><b>git push nodester master</b></p>
<p>Also make sure that you update your project's port address with the new one assigned by Nodester.</p>
<p>Start your application.</p>
<p><b>curl -X PUT -u "testuser:123" -d "appname=myapp&running=true" http://api.nodester.com/app</b></p>
<p><i>Don't worry :) You only need to start the application once. Subsequent git pushes will automatically pick up your changes and restart.</i></p>
<p><b>Visit your application via http://myapp.nodester.com</b></p>
<br/>

<p>&nbsp;</p>


</div>
</div>
</div>
     <div id="footer">
          <div class="footer-content">

            <div class="footer-box">
                <h4>About Us</h4>
                <ul>
                  <li>We started this project because the "other" node.js hosting services were not sending out coupon invitations. Now anyone can host node.js apps! You can access our source code repository at <a href="http://github.com/nodester">http://github.com/nodester</a></li>
                </ul>

            </div>

            <div class="footer-box">
                <h4>Nodester Core Team</h4>
                <ul>
                  <li><a href="http://twitter.com/chrismatthieu">@ChrisMatthieu</a></li>
                  <li><a href="http://twitter.com/davglass">@DavGlass</a></li>
                  <li><a href="http://twitter.com/danbuk">@DanBUK</a></li>
                  <li><a href="http://twitter.com/marcosvm">@Marcosvm</a></li>
                </ul>

            </div>

            <div class="footer-box">

                <h4>Node.js News</h4>
                <ul>
                  <!-- <li><a href="#">Lorem ipsum dolor sit amet.</a></li>
<li><a href="#">Quisque consequat nunc a felis.</a></li>
<li><a href="#">Suspendisse consequat magna at.</a></li>
<li><a href="#">Etiam eget diam id ligula rhoncus.</a></li>
<li><a href="#">Sed in mauris non nibh.</a></li> -->
                </ul>
            </div>

            <div class="footer-box end-footer-box">
                <h4>Search our site</h4>

                <form action="#" method="get">
                    <p>
                        <input type="text" id="searchquery" size="18" name="searchterm" value="coming soon"/>

                        <input type="submit" id="searchbutton" value="Search" class="formbutton" />
                    </p>
                </form>
            </div>
            <div class="clear"></div>
        </div>
        <div id="footer-links">

        <!-- A link to http://www.spyka.net must remain. To remove link see http://www.spyka.net/licensing -->
                <p>Node.JS is a trademark of Joyent | Website design by <a href="http://www.spyka.net">Free CSS Templates</a> | <a href="http://www.justfreetemplates.com">Free Web Templates</a></p>
        </div>
    </div>
<!-- twitter follow badge by go2web20 -->
<script src='http://files.go2web20.net/twitterbadge/1.0/badge.js' type='text/javascript'></script><script type='text/javascript' charset='utf-8'><!--
tfb.account = 'nodester';
tfb.label = 'follow-us';
tfb.color = '#35ccff';
tfb.side = 'r';
tfb.top = 275;
tfb.showbadge();
--></script>
<!-- end of twitter follow badge -->
</body>
</html>
Something went wrong with that request. Please try again.