blob: 3c9b4dfd53de07fe05c552c41baf576fbda60e72 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
.TH plop 1 "2021-02-24"
.SH NAME
plop \- Small hackable standalone engine for Lua web applications
.SH SYNOPSIS
.SY plop
.OP \-p PORT
.OP \-h
.RI [ HANDLER ]
.YS
.SH DESCRIPTION
.B plop
loads
.IR HANDLER
Lua script and starts a HTTP/1.1 server listening on a designated
.IR PORT .
.P
If
.IR PORT
is not specified server starts listening on
.B 8080
by default.
.P
If
.IR HANDLER
is not specified then default path defined during compilation is used instead. The script is loaded as if
.B require
was used with module name
.B handler
and the return value is set as global variable with the same name. Loaded script is expected to return a function which
will be used to handle each request.
.P
If
.B \-h
option is used a short help message is printed out to standard error output, and then program is terminated. This short
message contains default value of
.IR HANDLER .
|