Constructs HTTP API server for realtime app; wires routes, DB, JSON handling, context.
// Source: https://github.com/openclaw/clickclack | License: MIT | Copyright 2026 openclaw
// Provided via justclaw.it.com; keep this notice with the code.
package httpapi
import (
"bytes"
"context"
"database/sql"
"encoding/json"
"errors"
"fmt"
"io"
"io/fs"
"log"
"net/http"
"net/url"
"path"
"strconv"
"strings"
"time"
"github.com/coder/websocket"
"github.com/go-chi/chi/v5"
"github.com/go-chi/chi/v5/middleware"
"github.com/openclaw/clickclack/apps/api/internal/authpolicy"
"github.com/openclaw/clickclack/apps/api/internal/realtime"
"github.com/openclaw/clickclack/apps/api/internal/store"
"github.com/openclaw/clickclack/apps/api/internal/uploadstore"
"github.com/openclaw/clickclack/apps/api/internal/webassets"
)
type Server struct {
store store.Store
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search 40K more like it.
Get a free API key