https://github.com/ubuntu/simple-webserver-part
Snapcraft simple webserver part
https://github.com/ubuntu/simple-webserver-part
Last synced: about 1 year ago
JSON representation
Snapcraft simple webserver part
- Host: GitHub
- URL: https://github.com/ubuntu/simple-webserver-part
- Owner: ubuntu
- License: mit
- Created: 2017-02-13T15:28:35.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-02-13T16:27:25.000Z (over 9 years ago)
- Last Synced: 2025-03-30T06:02:23.241Z (about 1 year ago)
- Language: Go
- Size: 2.93 KB
- Stars: 5
- Watchers: 2
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# simple-webserver-part
Snapcraft simple webserver part
## Usage:
In your snapcraft.yaml:
1. Just have one of your snapcraft part defining:
`after: [simple-webserver]`
1. 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`.