Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

There are a few things that will make managing your pico engine and writing KRL code easier. 

...

Update to the Latest Version

You can update to the latest version using the command

Code Block
npm update -g pico-engine

Check Your Version

You can see which version you are using near the top-left corner of the "My Picos" page (localhost:8080) or by running the command

Code Block
npm ls -g pico-engine

...

Code Block
PORT=8081 
PICO_ENGINE_HOME=~/.pico-engine-1 pico-engine

Finding your IP address

By default, your pico engine will discover your IP address and use this as its host when calling meta:host. On startup, the pico engine will print the discovered IP address in the terminal like this: 

Image Added

If you are running your engine locally, then this IP address will be the private IP address given to you by your router, and will not be globally available on the Internet. However, other machines or devices on the same router/network will be able to find your engine using this IP address.

If you are running your engine on a cloud service such as Amazon's EC2 services, then this IP address will be globally available.

Warning

Switching to a different wifi or router will change your IP address, but the engine will use whatever address it found when it was booted up, NOT your current IP address. Restart your engine to use the new IP address.

Configuring your default host

You have the option to configure your pico engine's host on startup like this:

Code Block
PICO_ENGINE_HOST=http://localhost:8080 pico-engine

This is particularly useful if you expect to develop locally and jump between WiFis without wanting to restart your engine. This is also useful if you want to set the host to a domain name like http://www.picolabs.io instead of an IP address.

Running Your Engine In Dev vs Production Mode

...

  1. GitHub works well, with one caveat. See these instructions for more information about how to use GitHub to host KRL. The caveat is that GitHub caches the resources on raw URLs for about 5 minutes. If you're making frequent changes, it can be frustrating to wait out the cache. Alternatively, GitLab should give you fewer caching problems. (raw URLs to rulesets in private repositories need an account access token)
  2. AWS S3 works well. Be sure to make the URL for the ruleset is readable by the engine. 

...