This repository has been archived by the owner. It is now read-only.
[MOVED] A prototype implementation of the pico-engine written in node.js
JavaScript KRL HTML CSS
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin
krl
public adjust to shorter eci Sep 20, 2017
src
temp
.eslintrc.js
.gitignore
.travis.yml
CHANGELOG.md
LICENSE
README.md
appveyor.yml
package-lock.json
package.json

README.md

pico-engine

MOVED TO https://github.com/Picolab/pico-engine/tree/master/packages/pico-engine

build status windows build status

An implementation of the pico-engine hosted on node.js

Getting Started

Installing

You'll need node.js v4 or later.

Once you have node installed, use npm to install the pico-engine;

$ npm install -g pico-engine

Now your system has a new command called pico-engine.

To start the engine simply run this command

$ pico-engine
http://localhost:8080

Copy the url into a browser and see the UI.

Bootstrap

The first time you run the system it will create a root Pico and install two rulesets.

There are two rulesets used by all Picos:

  • io.picolabs.pico is used by each Pico to keep track of itself and its children
  • io.picolabs.visual_params is used by each Pico to keep track of it in the My Picos page

Using the My Picos page

With the rulesets installed, you can drag the rounded rectangle of your Pico and drop it wherever you want it. In its "About" tab (click on it to reveal the tabs) you can change its display name and color.

Also in the "About" tab, you can add and delete child Picos.

In the "Rulesets" tab you can see the information held for your Pico by each of its rulesets. By clicking on a ruleset id, you will be taken to the Engine Rulesets page where you can see its source code.

To make your own ruleset, write your code in the box in the Engine Rulesets page. Use the "validate" button until the code compiles. Then use the "register" button to register this version of your code with the engine.

CLI

Configuration

The server is configured via some environment variables.

  • PORT - what port the http server should listen on. By default it's 8080
  • PICO_ENGINE_HOME - where the database and other files should be stored. By default it's ~/.pico-engine/

Contributing

The pico-engine is made up of several smaller modules. Each with their own documentation and test suite.

To run the pico-engine in development mode do the following:

$ git clone https://github.com/Picolab/node-pico-engine.git
$ cd node-pico-engine
$ npm install
$ npm start

That will start the server and run the test. Anytime you make a change in the src/ folder it will restart the server and re-run the tests.

NOTE: When running via npm start the PICO_ENGINE_HOME will default to your current directory i.e. your clone of this repository.

Changelog

To view details about versions: CHANGELOG.md

License

MIT