Sonolus Wiki

01. Development Environment Setup

In this chapter, we are going to set up our development environment that will be used throughout rest of this guide.

If you have previous experience with Node.js ecosystem, this should be fairly standard and straightforward.

If you are new, everything might seem overwhelming at first and at times you might need to Google for related information as covering every detail of Node.js ecosystem is out of this guide's scope. However, you do not need deep understanding of things in order to develop with Sonolus.js.

Repository

Repository of the source code used in this guide is available at GitHub.

Each chapter has its own branch and two variants (TypeScript/Javascript, whichever you prefer), it is recommended to navigate to each branch while following along the guide.

Installing/Updating Node.js

First step is to download and install the latest LTS version of Node.js.

To verify you have successfully installed, execute in terminal:

node -v

or

npm -v

If you are able to see their version numbers, then you are good to go.

Initializing Project

Multiple Sonolus.js templates are available to bootstrap a project:

For example, to use the TS + ESLint + Prettier template:

npx degit Sonolus/sonolus.js-template-ts-eslint-prettier my-project

cd my-project
npm i

See README.md for more information about the template you are using.

Starting Dev Server

Run in project directory:

npm run dev:play

A dev server should be started and running, which you can connect to using Sonolus app.

In Sonolus Settings, you should:

  • In Cache: turn on Always Revalidate.
  • In Developer: turn on Debug Mode.

If you are able to play the dev level, then you are all set up and ready to get into developing with Sonolus.js!