mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-26 20:40:28 +00:00
parent
6a8c21269f
commit
3057315a1b
5 changed files with 23 additions and 8 deletions
|
@ -1,3 +1,5 @@
|
|||
mymodule = require "mymodule"
|
||||
|
||||
-- /.init.lua is loaded at startup in redbean's main process
|
||||
HidePath('/usr/share/zoneinfo/')
|
||||
|
||||
|
|
10
tool/net/demo/.lua/mymodule.lua
Normal file
10
tool/net/demo/.lua/mymodule.lua
Normal file
|
@ -0,0 +1,10 @@
|
|||
local mymodule = {}
|
||||
|
||||
function mymodule.hello()
|
||||
SetStatus(200)
|
||||
SetHeader('Content-Type', 'text/html; charset=US-ASCII')
|
||||
Write("<!doctype html>\r\n")
|
||||
Write("<b>Hello World!</b>\r\n")
|
||||
end
|
||||
|
||||
return mymodule
|
|
@ -1,2 +1,2 @@
|
|||
Write('hello world\r\n')
|
||||
StoreAsset('/hi', 'sup')
|
||||
mymodule.hello()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue