digitalmars.D.announce - Archttp - Fast and easy to use web framework.
- zoujiaqing (58/58) May 14 2022 Hi, everybody.
- zjh (2/5) May 14 2022 Shanghaier, is it easy to be harmed by the leaders?
- Domain (2/8) May 14 2022 静默已经够辛苦了,何必聊天还要说英文呢
- zoujiaqing (2/11) May 14 2022 你们俩都在D语言中文社区群吗?
- Domain (3/15) May 14 2022 https://forums.dlangchina.com/thread/10007
- zjh (2/3) May 14 2022 你不是不关心政治吗?受病毒欺负,都是应该的.
- zjh (2/3) May 14 2022 上海人,不是以洋为尊吗?我这是随他们的愿.
- ryuukk_ (4/63) May 14 2022 I'll check the source code, but so far it looks very nice! good
- Sergey (3/14) May 14 2022 Is it somehow related to PHP version?
- zoujiaqing (2/21) May 14 2022 The PHP version of Kerisy is a framework I designed 10 years ago.
Hi, everybody. The epidemic in China is serious. I am in home quarantine in Shanghai. I used to write a lot of frameworks. But they are huge and difficult to use. I've always wanted to design a lightweight Web framework that is easy to use and has good performance. These days I finally write a version. This version currently runs well on Linux and macOS. We haven't had time to test it on Windows yet. ```D import archttp; void main() { auto app = new Archttp; app.Bind(8080); app.Get("/", (context) { auto response = context.response(); response.body("Hello Archttp"); }); app.Get("/json", (context) { import std.json; auto response = context.response(); auto j = JSONValue( ["message" : "Hello, World!"] ); response.json(j); }); app.Get("/user/{id:\\d+}", (context) { auto request = context.request(); auto response = context.response(); response.body("User id: " ~ request.parameters["id"]); }); app.Get("/blog/{name}", (context) { auto request = context.request(); auto response = context.response(); response.body("Username: " ~ request.parameters["name"]); }); app.Post("/upload", (context) { auto response = context.response(); response.body("Using post method!"); }); app.Run(); } ``` The project relies on 'nbuff' and 'httparsed', which provide very powerful support for 'Archttp'. ** Thanks to 'ikod' and 'Tchaloupka'.** Be aware that there will be many changes and tweaks to the API in the future. It's not a stable version yet. The current project supports HTTP 1.1 request processing. And a good built-in routing module. ```bash git clone https://github.com/kerisy/archttp.git cd archttp/examples/httpserver/ dub run ``` https://github.com/kerisy/archttp
May 14 2022
On Saturday, 14 May 2022 at 14:58:52 UTC, zoujiaqing wrote:Hi, everybody. The epidemic in China is serious. I am in home quarantine in Shanghai.Shanghaier, is it easy to be harmed by the leaders?
May 14 2022
On Saturday, 14 May 2022 at 15:16:42 UTC, zjh wrote:On Saturday, 14 May 2022 at 14:58:52 UTC, zoujiaqing wrote:静默已经够辛苦了,何必聊天还要说英文呢Hi, everybody. The epidemic in China is serious. I am in home quarantine in Shanghai.Shanghaier, is it easy to be harmed by the leaders?
May 14 2022
On Saturday, 14 May 2022 at 16:06:36 UTC, Domain wrote:On Saturday, 14 May 2022 at 15:16:42 UTC, zjh wrote:你们俩都在D语言中文社区群吗?On Saturday, 14 May 2022 at 14:58:52 UTC, zoujiaqing wrote:静默已经够辛苦了,何必聊天还要说英文呢Hi, everybody. The epidemic in China is serious. I am in home quarantine in Shanghai.Shanghaier, is it easy to be harmed by the leaders?
May 14 2022
On Saturday, 14 May 2022 at 16:51:02 UTC, zoujiaqing wrote:On Saturday, 14 May 2022 at 16:06:36 UTC, Domain wrote:https://forums.dlangchina.com/thread/10007 这个?刚刚申请加入😀On Saturday, 14 May 2022 at 15:16:42 UTC, zjh wrote:你们俩都在D语言中文社区群吗?On Saturday, 14 May 2022 at 14:58:52 UTC, zoujiaqing wrote:静默已经够辛苦了,何必聊天还要说英文呢Hi, everybody. The epidemic in China is serious. I am in home quarantine in Shanghai.Shanghaier, is it easy to be harmed by the leaders?
May 14 2022
On Saturday, 14 May 2022 at 16:51:02 UTC, zoujiaqing wrote:你们俩都在D语言中文社区群吗?你不是不关心政治吗?受病毒欺负,都是应该的.
May 14 2022
On Saturday, 14 May 2022 at 16:06:36 UTC, Domain wrote:静默已经够辛苦了,何必聊天还要说英文呢上海人,不是以洋为尊吗?我这是随他们的愿.
May 14 2022
On Saturday, 14 May 2022 at 14:58:52 UTC, zoujiaqing wrote:Hi, everybody. The epidemic in China is serious. I am in home quarantine in Shanghai. I used to write a lot of frameworks. But they are huge and difficult to use. I've always wanted to design a lightweight Web framework that is easy to use and has good performance. These days I finally write a version. This version currently runs well on Linux and macOS. We haven't had time to test it on Windows yet. ```D import archttp; void main() { auto app = new Archttp; app.Bind(8080); app.Get("/", (context) { auto response = context.response(); response.body("Hello Archttp"); }); app.Get("/json", (context) { import std.json; auto response = context.response(); auto j = JSONValue( ["message" : "Hello, World!"] ); response.json(j); }); app.Get("/user/{id:\\d+}", (context) { auto request = context.request(); auto response = context.response(); response.body("User id: " ~ request.parameters["id"]); }); app.Get("/blog/{name}", (context) { auto request = context.request(); auto response = context.response(); response.body("Username: " ~ request.parameters["name"]); }); app.Post("/upload", (context) { auto response = context.response(); response.body("Using post method!"); }); app.Run(); } ``` The project relies on 'nbuff' and 'httparsed', which provide very powerful support for 'Archttp'. ** Thanks to 'ikod' and 'Tchaloupka'.** Be aware that there will be many changes and tweaks to the API in the future. It's not a stable version yet. The current project supports HTTP 1.1 request processing. And a good built-in routing module. ```bash git clone https://github.com/kerisy/archttp.git cd archttp/examples/httpserver/ dub run ``` https://github.com/kerisy/archttpI'll check the source code, but so far it looks very nice! good job! very simple and easy to use API! Thanks for sharing!
May 14 2022
On Saturday, 14 May 2022 at 14:58:52 UTC, zoujiaqing wrote:Hi, everybody. The epidemic in China is serious. I am in home quarantine in Shanghai. I used to write a lot of frameworks. But they are huge and difficult to use. I've always wanted to design a lightweight Web framework that is easy to use and has good performance. These days I finally write a version. This version currently runs well on Linux and macOS. We haven't had time to test it on Windows yet. https://github.com/kerisy/archttpIs it somehow related to PHP version? https://github.com/kerisy-php
May 14 2022
On Saturday, 14 May 2022 at 19:46:02 UTC, Sergey wrote:On Saturday, 14 May 2022 at 14:58:52 UTC, zoujiaqing wrote:The PHP version of Kerisy is a framework I designed 10 years ago.Hi, everybody. The epidemic in China is serious. I am in home quarantine in Shanghai. I used to write a lot of frameworks. But they are huge and difficult to use. I've always wanted to design a lightweight Web framework that is easy to use and has good performance. These days I finally write a version. This version currently runs well on Linux and macOS. We haven't had time to test it on Windows yet. https://github.com/kerisy/archttpIs it somehow related to PHP version? https://github.com/kerisy-php
May 14 2022