No description
Find a file
Didier Roche b916c9c067 Make it compatible with current snapcraft importer
Move to root directory as snapcraft importer doesn't support yet the new
directory scheme.
2017-02-13 17:26:34 +01:00
webserver Add simple webserver code 2017-02-13 17:12:01 +01:00
.gitignore Add gitignore 2017-02-13 17:13:22 +01:00
LICENSE Initial commit 2017-02-13 16:28:36 +01:00
README.md Update README 2017-02-13 17:11:52 +01:00
snapcraft.yaml Make it compatible with current snapcraft importer 2017-02-13 17:26:34 +01:00

simple-webserver-part

Snapcraft simple webserver part

Usage:

In your snapcraft.yaml:

  1. Just have one of your snapcraft part defining: after: [simple-webserver]
  2. Then, spawn a service with it, with the part relative to your snap to serve:
apps:
  my-server:
    command: webserver www
    daemon: simple
    restart-condition: always
    plugs: [network-bind]

Here, www is relative to $SNAP from your own snap.

You can change the default port (8080) with the -p option, for instance: command: webserver -p 9001 www.