Stop the server by sending a kill signal from the console (typically Ctrl+C)

Other recommended steps

These are not strictly necessary to run the server, but recommended anyway.

Password

Create a one-line "password.txt" file containing a secret password. If you do not want a separate file for password, you can still define that in the orion.conf or just leave the pwd value as empty.

Launch the Orionode server with the -password password.txt argument.

Making sure Orionode can launch npm

Orionode lets you use npm commands in the Orion shell to manage the dependencies of a project you're writing. To do this, the server makes a guess about the path where the NPM internals are located on your computer. If you installed a recent version of Node.js, npm should be installed automatically and the guess should work. If you installed npm separately, this guess may be wrong. If you see an error message on either server console or when you type npm in the shell page, you have to specify the path to npm-cli.js yourself:

In the server directory, open the orion.conf file. Observe the npm_path setting. By default its value is empty.

How to confirm: For instance, if you are using Bash just type which npm and see where the command is. The command should eventually use the npm-cli.js file. Make sure your npm-cli.js matches the npm_path value. If not, then change the npm-path value to match your environment. It can be either an absolute path or a path relative to your node executable.

Restart server. If you do not see any npm error from the server console, your npm path is set properly.

Server command line arguments

All these arguments are optional.

-p or -port

The port that the Orion server will listen on. Defaults to 8081.

-pwd or -password

Path to a file containing a password. If provided, Orionode will enforce HTTP Basic Authentication with the password (the auth 'User' field is ignored -- Orionode only verifies the password). Use caution: if you don't provide a password file, no authentication is used (so anyone request can read and write your files!).

-w or -workspace

The target directory for reading and writing files. Will be created if it doesn't exist. Defaults to a subdirectory named .workspace in the repository folder.

-dev

Starts the server in development mode. In this mode, some client-side code is not cached by the browser, to ease development.

-log

Logs each request served to standard output.

Developing a node.js application

Now in the browser you can start to develop your node.js applications. Orionode uses largely the UI you're accustomed to from Orion. (Refer to Orion user guide for basic instructions). Please note that the Sites and Git pages are not available in Orionode. Here is a typical workflow:

Use the Navigator and Edit pages to create and edit your folders and node applications.

Go to the Shell page.

cd to the folder where your application lives.

Use npm install to install your dependency packages if needed. You can use basically all the npm arguments here.

Use node start yourApp.js to start your application.

Use node list to monitor all the applications you've started and still running.

Use node stop PID to stop an application if you want to force it to stop.

Debugging a node.js application

You can use Orionode to debug your node.js application. If you have exisiting node.js applications, make sure the code is under a subfolder in the -w option when you start Orionnode. This will give you easy access to your node.js apps from within Orionode.
You can also create a new node.js application in your workspace.

After Orionode starts, open the shell page and use help to see what commands are available.

cd to the folder where your application lives.

Use node debug yourApp.js givenPort to start your app in debug mode. You can start multiple apps in debug mode by repeating this step.

In the return value of the node debug command, you will see a "debugURL" string.

Concatenation and Minification

By default the pages served up by Orionode are not concatenated or minified, so they will load rather slowly. You can mitigate this by running the client-side build. To do this, just run build.js, found in the org.eclipse.orion.client/modules/orionode/build directory:

node ./build/build.js

Running the script will overwrite files in your working directory! Make sure anything important is committed to a branch first.

Clear your browser cache. The next time you load Orionode, it should be much faster.

Other ways of using Orionode

You can use Orionode as a file server, to access your local files from http://www.orionhub.org/ (or any other Orion installation). All you need is
Orionode and a publicly-accessible URL pointing to your local Orionode server.