Re: VB6 FastCGI Web App Server Framework
VB6 FastCGI Web App Server Framework. This is a great work
I also made an http server, but it is a dll component that can be embedded in any vba/vb6 project to have your own web server.
Just like Python, we can create a web server in just a few sentences without the need for underlying implementations. Let's take a look at an example:
Code:
' A complete web server in just a few lines of code
' === 1. Create Business Class (bDemo.cls) ===
Public Sub Hello(ctx As cHttpServerContext)
Dim id As Long: id = ctx.Request.QueryString("id")
ctx.Response.Text "Hello VBMAN! id=" & id
End Sub
' === 2. Start Server (Form1.frm) ===
Dim HttpServer As New cHttpServer
With HttpServer
.Router.Reg "Demo", New bDemo ' Register business class
.Router.AutoRoute = True ' Enable auto-routing
.Start 800 ' Start server, listen on port 800
End With
MsgBox "Server running at http://localhost:800"
' Visit: http://127.0.0.1:800/demo/hello?id=123
If you are interested, you are welcome to visit its documentation and source code. It is now open source on github
https://github.com/woeoio/vbman