miniweb 0.1.0
A minimal yet complete web framework
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
This package provides sub packages which can be used individually:
miniweb:http - A full HTTP parser, supporting HTTP/1.x
Miniweb
A minimal yet complete webframework.
License
The code in this repository is licensed under AGPL-3.0-or-later; for more details see the LICENSE
file in the repository.
Getting started
This library aims to have an small but complete webframework for dlang projects.
A simple hello world project:
module test;
import miniweb;
import miniweb.main;
mixin MiniWebMain!test;
@OnServerStart
void configureServer(ServerConfig conf) {
conf.setCustomServerInfo("My Fancy Server");
}
@Route("/doSomething")
void doSomething() {
writeln("Does something!");
}
@Route("/returnSomething")
Response returnSomething(HeaderBag headers) {
auto resp = Response.build_200_OK();
resp.headers.set("X-My-Header", headers.get("X-My-Header"));
resp.setBody("Hello world!");
return resp;
}
Miniweb has the ability to analyse annotated functions and call them with any order of parameters, as long as minweb supports the type.
Currently supported are:
Request
get the raw requestHeaderBag
get the headers of the request
Roadmap
- Middlewares
- More bodytypes to move data
- Allowing more returntypes, i.e. auto-serializing
- Allowing detection of more request parameters
- Routes with placeholders / regex
- Full http/1.1 support
- http/2 support
- ssl/tls support
- ...
- Registered by Mai Lapyst
- 0.1.0 released a year ago
- Bithero-Agency/miniweb-d
- AGPL-3.0-or-later
- Copyright © 2023, Mai-Lapyst
- Authors:
- Sub packages:
- miniweb:test, miniweb:http
- Dependencies:
- miniweb:http, miniasync
- Versions:
-
1.0.1 2023-Jul-09 1.0.0 2023-Jul-03 0.4.0 2023-Jun-08 0.3.0 2023-Apr-09 0.2.0 2023-Apr-09 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
0 downloads this month
-
29 downloads total
-
- Score:
- 0.4
- Short URL:
- miniweb.dub.pm