How to install BladeRunnerJS

Prerequisites

Java

In order to run BRJS you'll need Java 7 or 8 installed. Since BRJS requires Java to be on the system PATH, and the JRE installer doesn't do this for all systems, we recommend you install the JDK which will update the PATH. If you are comfortable updating the PATH to reference your Java install you can of course install the JRE.

To check that Java is on your path open up a new console or terminal and execute java -version. You should see something similar to the following:

› java -version
java version "1.8.0_05"
Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode)

Web Server

BRJS comes with an in-build development server that you can use to run blades in isolation and to run your full application.

To host built apps you'll need a web server that can serve static files, for example PHP's built in web server, Python's SimpleHTTPServer, or Apache Tomcat 6.x.

BRJS supports building apps as a set of static files or as a WAR file so you can deploy your BRJS app as a WAR on any supporting web server e.g JBOSS or Apache Tomcat. More information on deploying BRJS apps.

Download & Install BRJS

Download the latest BRJS release and unzip it somewhere. We'll now refer to that unzipped location as BRJS_HOME. The BRJS CLI executable is BRJS_HOME/sdk/brjs.

Note: in order to use the brjs commands from any location on your machine, add BRJS_HOME/sdk to your Path in Environment Variables.

Note: Upon running your first brjs command, you will be asked whether you would like to provide anonymous tracking of your use of BRJS. This means that information such as commands run, bundle times or operating system used, will be recorded for research purposes. We would like to encourage you to participate, as this will help us improve our products by gaining insight into common use cases and system specifications. Should you change your mind later on, you can always do so by either:

  • running any brjs command with the --stats flag (tracking enabled) or --no-stats flag (tracking disabled) or;
  • editing the value of the property allowAnonymousStats in your BRJS_HOME/conf/brjs.conf to true (tracking enabled) or false (tracking disabled).
BRJS scans up the directory tree looking for one of 2 identifiers in order to locate where apps' live. If a file named app.conf is found, which identifies a single app folder, the directory above the app will be used as the apps location. Failing this if an apps folder is found inside one of the parent directories this will be used as the apps location. If neither of these conditions is met the current working directory will be used as the apps location.