File: README.md

package info (click to toggle)
websocketd 0.4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 612 kB
  • sloc: makefile: 131; sh: 85; ansic: 78; javascript: 65; cs: 58; perl: 51; python: 43; ruby: 41; php: 40; java: 26; haskell: 20
file content (19 lines) | stat: -rw-r--r-- 516 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
## Haskell examples

### Count

Start the server with

```
$ websocketd --port=8080 --devconsole --passenv PATH ./count.hs
```

The passing of `PATH` was required for me because a typical Haskell installation of `runhaskell` does not go into `/usr/bin` but more like `/usr/local/bin`.

### Greeter

The greeter server waits for a line of text to be sent, then sends back a greeting in response, and continues to wait for more lines to come.

```
$ websocketd --port=8080 --devconsole --passenv PATH ./greeter.hs
```