No description, website, or topics provided.
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin
src
.gitignore
README.md
example-config.json
package.json

README.md

Alice

Installation

git clone git://github.com/mrtesla/alice-scaffold.git

Configuration

Edit: config.json

{
  "alice": {
    "router":     { "enabled" : true },
    "passer":     { "enabled" : true },
    "prober":     { "enabled" : true },
    "varnish":    { "enabled" : true },
    "controller": { "enabled" : true }
  },
  "pluto": {
    "user": {
      "separation" : false,
      "default"    : "simon"
    },
    "runit": {
      "dir": "/usr/local/var/service"
    },
    "syslog" : false
  }
}

Configure and start

bin/alice setup
bin/pluto start sys:alice:**

Upgrading

bin/pluto stop sys:alice:**
bin/alice upgrade
bin/pluto start sys:alice:**

Core principles

Routing

Domain lookup

When a request is made for the domain alice.p.a.mrhenry.be

HMGET alice.http|domains alice.p.a.mrhenry.be. *.alice.p.a.mrhenry.be. *.p.a.mrhenry.be. *.a.mrhenry.be. *.mrhenry.be. *.be. *.
1) NULL
2) "[[\"forward\", \"alice\"]]"
3) NULL
4) NULL
5) "[[\"forward\", \"client_mrhenry-production\"]]"
6) NULL
7) NULL

The first non-NULL result is used.

Path lookup

When a request is made for the path /images/logo.png

HMGET alice.http|app|paths /images/logo.png /images/logo.png/* /images/* /*
1) NULL
2) NULL
3) "[[\"forward\", \"static\"]]"
4) "[[\"forward\", \"web\"]]"

Again the first non-NULL result is used.