Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Improved readme and actually learnt markdown

  • Loading branch information...
commit 8367d57a4787923be421bbfbf5ddf1fc533563ee 1 parent a3cf617
@cubehouse cubehouse authored
Showing with 68 additions and 4 deletions.
  1. +43 −4 README
  2. +25 −0 ubuntu.upstart.conf
@@ -1,12 +1,51 @@
-0x10code server written in Node.JS.
+# - Makes sharing 0x10c code easy!
Uses MongoDB and Express.
Make sure you have nodejs, mongodb and npm installed on your machine.
-To install node.js libraries, simply run "npm install" in the root of the git repo.
+## Install Software
-Copy the config_example.js file to config.js and edit the values to match your environment.
+### Ubuntu/Debian
-Finally, to run the server, simply run "node app.js".
+ sudo apt-get install nodejs mongodb
+### Other Distros.
+Install or compile Node.JS ( and MongoDB (
+### Install Node Package Manager
+Obviously skip this if you already have npm installed
+ curl | sudo sh
+### Install Required Node.JS Packages
+ npm install
+### Configure
+Copy the example configuration and modify to suit your environment (if needed).
+ cp config_example.js config.js
+ vim config.js
+## Run
+ node app.js
+## Setup as Ubuntu Upstart Service
+This service example uses supervisor to keep the process alive.
+ sudo npm install supervisor -g
+ sudo cp ubuntu.upstart.conf /etc/init/0x10code.conf
+ sudo vim /etc/init/0x10code.conf
+Modify the server path and the execution user accordingly. You will now be able to start/top the server using:
+ start 0x10code
+ stop 0x10code
+The default setup is to start the server automatically upon server startup. You can change these instructions in the 0x10code.conf file.
25 ubuntu.upstart.conf
@@ -0,0 +1,25 @@
+description "0x10code Server"
+author "Mappum (GitHub) - Ubuntu startup script by Cubehouse (GitHub)"
+start on startup
+stop on shutdown
+ # change this to point to your 0x10code path
+ export HOME="/path/to/0x10code"
+ cd $HOME
+ echo $$ > /var/run/
+ # change USER to run as the desired server user account
+ exec sudo -u USER supervisor app.js >> /var/log/0x10code.sys.log 2>&1
+end script
+pre-start script
+ # Date format same as (new Date()).toISOString() for consistency
+ echo "[`date -u +%Y-%m-%dT%T.%3NZ`] (sys) Starting" >> /var/log/0x10code.sys.log
+end script
+pre-stop script
+ rm /var/run/
+ echo "[`date -u +%Y-%m-%dT%T.%3NZ`] (sys) Stopping" >> /var/log/0x10code.sys.log
+end script
Please sign in to comment.
Something went wrong with that request. Please try again.