Mercurial Hosting > luan
annotate src/luan/modules/http/serve.luan @ 1515:78d937870762
Thread.synchronized
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Sat, 30 May 2020 17:58:35 -0600 |
parents | 307e76ccd0d6 |
children | 5eb985d1411f |
rev | line source |
---|---|
693
ca169567ce07
module URIs must now include ".luan"
Franklin Schmidt <fschmidt@gmail.com>
parents:
494
diff
changeset
|
1 local Io = require "luan:Io.luan" |
ca169567ce07
module URIs must now include ".luan"
Franklin Schmidt <fschmidt@gmail.com>
parents:
494
diff
changeset
|
2 local Server = require "luan:http/Server.luan" |
1201
7f4a12fb7716
remove logging/init.luan
Franklin Schmidt <fschmidt@gmail.com>
parents:
1172
diff
changeset
|
3 |
347
612a283b3d14
improve luan/web file names and add serve.luan
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff
changeset
|
4 |
612a283b3d14
improve luan/web file names and add serve.luan
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff
changeset
|
5 if #{...} ~= 1 then |
1281 | 6 Io.stderr.write "usage: luan luan:http/serve.luan dir\n" |
347
612a283b3d14
improve luan/web file names and add serve.luan
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff
changeset
|
7 return |
612a283b3d14
improve luan/web file names and add serve.luan
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff
changeset
|
8 end |
612a283b3d14
improve luan/web file names and add serve.luan
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff
changeset
|
9 |
612a283b3d14
improve luan/web file names and add serve.luan
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff
changeset
|
10 Server.serve(...) |