Linking Hashlink to the role of a webserver.
class Main {
function main() {
var app = new weblink.Weblink();
app.get(function(request,response)
{
response.send("HELLO WORLD");
});
app.listen(2000);
}
}
- Uses libuv
- Minimal and concise with express lib in mind
- No dependencies, and easy integration
- Extremely fast, roughly 4x faster than Fastify with big data, and 2x with small Benchmark
Install dev version:
haxelib git weblink https://github.com/PXshadow/weblink
Include in build.hxml
-lib weblink
- requires libuv
- hashlink (uses libuv)
- methods
- GET
- POST
- OPTIONS
- HEAD
- PUT
- encoding
- gzip
- compress
- deflate
- br
- caching
- age
- expires
- security
- extra
- content type
- bytes (png image for instance)
- redirects
- serve web content (files ex: html/images/sounds)
- connection public ip (haxe 4.2)
- projection (a type with certain attributes of another type, useful to send only some data)
- Fork
- Clone and setup
- Create a pull request with your changes