We're pleased to announce the release of version 0.13 of our multi-platform StratifiedJS implementation Oni Apollo.
Apollo 0.13 is the first version with 'official' server-side support, based on nodejs.
To execute StratifiedJS files on the server run the
Usage: apollo [options] [script.sjs [arguments]] Without a script.sjs argument you get dropped into a stratified REPL. Options: -h, --help display this help message -e, --eval STR evaluate STR
You can execute
apollo straight from Apollo's root directory. The only dependency is that you need to have a recent version of nodejs installed.
Apollo's module system has been made to work seamlessly on the client and server, and most modules of the Apollo Standard Module Library work fine in either environment. E.g. the following code can run in the browser or on the server:
Of course you can also use any nodejs module in server-side Apollo programs:
// load socket.io (if installed via npm): require('nodejs:socket.io'); // load node's builtin 'path' module: require('nodejs:path'); // for builtins 'nodejs:' scheme is optional: require('path');
For an example of a more substantial server-side StratifiedJS program you can take a look at the rocket webserver.