GNDLine - Go the GroundLine

GNDLine is a next-generation web runtime with Go as its primary language.

Could this tiny file really run?

Yes. This exact file runs as a page.

    <%@ LANGUAGE="GND.Go.Yaegi" %>
    <%
    import . "OpenASP"
    
    func run() {
        Response.Write("<h1>Hello from Go on GNDLine.</h1>")
    }
    %>

JSON APIs are just as easy

Yes. This exact file runs as a JSON endpoint.

    <%@ LANGUAGE="GND.Go.Yaegi" %>
    <%
    import . "OpenASP"
    
    func run() {
        Response.WriteJSON(map[string]any{
            "ok": true,
            "message": "Hello from GND.Go.Yaegi via .api",
        })
    }
    %>

What else can it do?

The packaged examples cover these core host and page surfaces:

This package includes these language engines

The packaged page examples run on:

Quick Start

Enter the package directory and run:

    ./bin/gndl

Download:

.Router

Install this in global.asa to register routes at app startup.

    <script language="GND.Go.Yaegi" runat="server">
    import . "OpenASP"
    
    func Application_OnStart() {
        router, _ := AsRouter(Server.CreateObject(".Router"))
        router.GET("/routed.asp", "/target.asp")
        router.GET("/api/*", "/api/json.api")
        router.GET("/users/{id}.asp", "/auth/home.asp")
        Application.Use(router)
    }
    </script>

.AuthBySession

Install this in global.asa to protect routes before page entry.

    <script language="GND.Go.Yaegi" runat="server">
    import . "OpenASP"
    
    func Application_OnStart() {
        auth, _ := AsAuthBySession(Server.CreateObject(".AuthBySession"))
        auth.Item("/member/*", "MemberID", "/login.asp")
        auth.Item("/admin/*", "AdminID", "/login-admin.asp")
        Application.Use(auth)
    }
    </script>

OpenVBS page

This page uses classic VBScript-style CreateObject(...).

    <%
    set dic = CreateObject("Scripting.Dictionary")
    dic("foo") = "bar"
    %>
    <h1><%= dic("foo") %></h1>

Go hosts OpenVBS

This page calls an OpenVBS function from Go.

    <%@ LANGUAGE="GND.Go.Yaegi" %>
    <script language="GND.OpenVBS" runat="server">
    function GetMessage()
        GetMessage = "this is OpenVBS in Go."
    end function
    </script>
    <%
    func run() {
        message := GetMessage()
        Response.Write(message)
    }
    %>

OpenVBS hosts Go

This page calls a Go function from OpenVBS.

    <%@ LANGUAGE="GND.OpenVBS" %>
    <script language="GND.Go.Yaegi" runat="server">
    func GetMessage() string {
        return "this is Go in OpenVBS."
    }
    </script>
    <%
        v = GetMessage()
        Response.Write v
    %>

BILDB.Connection

BILDB can connect your database like a ADODB.

    <%
    conn("SELECT * FROM TMember WHERE name=?", "jenny").foreach(function(r)
        Response.Write r(0).name & ":" & r("id")
        Response.Write r(1).name & ":" & r("name")
        Response.Write r(2).name & ":" & r("time")
    end function)
    %>


© 2026 NaturalStyle PREMIUM