Basics: Using URSYS - dsriseah/ursys GitHub Wiki

Sri's Universal Realtime System (URSYS)

URSYS is a command-line framework for making Javascript apps for both server and web. When you pull URSYS from the repo, you get a directory structure and the tooling to develop Javascript programs using its modules and libraries.

Running Commands

There's a command tool that can be run from inside the _ur directory. It will "run" any of the directories defined inside of the sibling _ur_addons directory. For example:

image

There are two built-in commands:

  • ur build compiles and packages the code in the _ur and _ur_addons
  • ur test runs the test modules defined anywhere within the root

The rest of the commands are implemented in the folders within _ur_addons that defined a command line interface. Here's a list of what's currently in the repo.

SIMPLE TESTS

  • ur loki - test implementation of a LokiJS command line tool
  • ur parse - test suite for parsing using peggy.js
  • ur graph - test suite for parsing graphs using peggy.js
  • ur sqlite - test suite for using sqlite3

CLIENT SERVER TESTS

  • ur midi - spins up a web server that provides a simple MIDI piano keyboard.
  • ur net - test apps for URSYS Messaging

CODE PLAYGROUNDS

  • ur jsplay - Dynamically finds and runs NodeJS scripts, rerunning them on save. Useful for trying out stuff.
  • ur webplay - Dynamically finds and runs NodeJS and Web Browser scripts, implementing 'live reload' in the browser.

[!IMPORTANT] The ur command runs only when you are running it from inside the _ur directory.

Additionally, URSYS is built on NodeJS and implements run scripts wherever you see a package.json file. As a user, though, you will use run scripts on from the root directory's package.json or within the NodeJS applications you develop yourself.

  • npm run example compiles a webapp and serves it

Developing Code

tbd


Reference: Directory Structure

The root directory contains:

  1. The URSYS "Core" (_ur directory) Runtime
  2. URSYS "AddOns" (_ud_addons directory)
  3. Apps (any directory in the root directory beginning with app-)