From 76ce905ef3e93f067b6d06458186bcf9eb9b5c01 Mon Sep 17 00:00:00 2001 From: ame Date: Sat, 3 Aug 2024 02:30:02 -0500 Subject: fix tests, module based require, thread improvments --- readme.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'readme.md') diff --git a/readme.md b/readme.md index 80bdd8c..4720337 100644 --- a/readme.md +++ b/readme.md @@ -7,16 +7,18 @@ heres an example of a webserver to return a [sha0](https://en.wikipedia.org/wiki
```lua -llib = require "lullaby" +--(this is in tests/net2.lua) +net = require "lullaby.net" +crypto = require "lullaby.crypto" local port = 8080 MAX_LENGTH = 2048 -llib.net.listen(function(server) +net.listen(function(server) --listen to post requests at localhost:8080 (root directory) server:POST("/", function(res, req) --creates a sha0 hash object - local hash = llib.crypto.sha0() + local hash = crypto.sha0() --loads an extra 2048 characters from the request body (the body is not guaranteed to be >= 2048 characters, reasoning in docs) req:roll(MAX_LENGTH) -- cgit v1.2.3