Skip to content

ROAR App Installation

Use the create-roar-app template to create your app


Installation

To create a new app, first navigate to the directory in which you want to store all of your ROAR assessments. For example

mkdir -p ~/roar-apps
cd ~/roar-apps

You may then choose one of the following methods:

Installation options

npx create-roar-app@latest my-roar-app

npx is a package runner tool that comes with npm 5.2+ and higher.

npm init roar-app@latest my-roar-app

npm init <initializer> is available in npm 6+

yarn create roar-app@latest my-roar-app

yarn create <starter-kit-package> is available in Yarn 0.25+

Follow the on-screen prompts and answer questions about your application. Here's an example:

This will create a directory called my-roar-app inside the current folder.
Inside that directory, it will generate the initial project structure and install some dependencies. Once the installation is done, you can navigate to your project folder:

cd my-roar-app

and make edits to your experiment's code. See the following pages for more detail:

Available commands

Inside the newly created project, you can run some built-in commands:

See a list of available commands

npm run
yarn run

Start a development server

npm start
yarn start

Runs the app in development mode.
Visit http://localhost:8080 to view it in the browser.

The page will automatically reload if you make changes to the code.

We recommend using the Google Chrome browser for your web development. Use the Chrome DevTools to view your web application's DOM or debug your JavaScript.

To stop the development server in your console, press Ctrl+C.

Build your app for deployment

npm run build
yarn build

Builds the app for production to the dist folder.
This correctly bundles your ROAR app in production mode and optimizes the build for the best performance.

Your app is then ready to be deployed.

There are other commands as well. The difference between npm run build:dev and npm run build:prod, for example, is explained in the Configuration section.

Make your first commit

Before we start configuring your app, let's commit the files that the create-roar-app initializer created in your app directory.

git add .
git commit -m "First commit. Add files created by the create-roar-app initializer"

Now that you've committed the initial files, let's explore the folder we've created and start writing your experiment.