惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

J
Java Code Geeks
GbyAI
GbyAI
Google DeepMind News
Google DeepMind News
Jina AI
Jina AI
B
Blog
aimingoo的专栏
aimingoo的专栏
酷 壳 – CoolShell
酷 壳 – CoolShell
T
The Blog of Author Tim Ferriss
Last Week in AI
Last Week in AI
月光博客
月光博客
H
Help Net Security
V
Visual Studio Blog
量子位
A
About on SuperTechFans
博客园 - Franky
人人都是产品经理
人人都是产品经理
N
Netflix TechBlog - Medium
云风的 BLOG
云风的 BLOG
雷峰网
雷峰网
Martin Fowler
Martin Fowler
Microsoft Security Blog
Microsoft Security Blog
博客园 - 叶小钗
P
Proofpoint News Feed
MongoDB | Blog
MongoDB | Blog

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Introducing Golt: A Lightweight TypeScript Runtime Powere...
Eddy Ortega · 2026-05-15 · via DEV Community

Eddy Ortega

Introducing Golt: A Lightweight TypeScript Runtime Powered by Go

Over the last few weeks, I have been working on Golt, a small TypeScript/JavaScript runtime written in Go.

The idea behind Golt is simple:

Write backend scripts and small APIs in TypeScript, then run them inside a Go-powered runtime with a small and explicit API surface.

Golt is not trying to be a full Node.js replacement. Instead, it focuses on a more controlled runtime experience where only the APIs provided by Golt are available.

Why Golt?

I wanted a runtime that could feel familiar for TypeScript developers, but still be powered by Go internally.

The goal is to keep the developer experience simple:

golt init my-api
cd my-api
golt run app.ts

Enter fullscreen mode Exit fullscreen mode

And then write backend code like this:

const app = Golt.App();

app.use(Golt.logger({ format: "dev" }));

app.get("/", (ctx) => {
  ctx.Json({
    message: "Hello from Golt!",
    runtime: "golt",
  });
});

app.serve(3000);

Enter fullscreen mode Exit fullscreen mode

Behind the scenes, Golt bundles the TypeScript entry file with esbuild and executes it inside a Go-hosted JavaScript engine.

What does Golt include?

Golt currently provides a small set of backend-focused APIs:

  • console.log
  • Golt.env
  • Golt.App
  • Golt.logger
  • Golt.db
  • Golt.fs
  • Golt.crypto
  • Golt.jwt
  • global fetch()

The idea is to keep the runtime surface small, predictable and easy to document.

HTTP server

Golt includes a simple HTTP server API:

const app = Golt.App();

app.get("/", (ctx) => {
  ctx.Send("Hello from Golt HTTP");
});

app.get("/users/{id}", (ctx) => {
  ctx.Json({
    id: ctx.Param("id"),
  });
});

app.notFound((ctx) => {
  ctx.Status(404).Send("not found");
});

app.serve(3000);

Enter fullscreen mode Exit fullscreen mode

Routes support Go-style path parameters like:

/users/{id}

Enter fullscreen mode Exit fullscreen mode

And handlers receive a Context object with helpers like:

ctx.Param("id");
ctx.Query("q");
ctx.Status(201);
ctx.Json(data);
ctx.Send("text");

Enter fullscreen mode Exit fullscreen mode

Database access

Golt wraps Go's database/sql package and exposes Promise-based database helpers.

The API separates commands that mutate state from commands that return rows:

const db = Golt.db.connect("sqlite", "./app.db");

await db.exec(`
  CREATE TABLE IF NOT EXISTS users (
    id INTEGER PRIMARY KEY AUTOINCREMENT,
    name TEXT NOT NULL
  )
`);

await db.exec("INSERT INTO users(name) VALUES (?)", "Ada");

const users = await db.query("SELECT id, name FROM users");

console.log(users);

Enter fullscreen mode Exit fullscreen mode

The intended pattern is:

await db.exec("INSERT / UPDATE / DELETE / CREATE ...");
const rows = await db.query("SELECT ...");

Enter fullscreen mode Exit fullscreen mode

Fetch, filesystem, crypto and JWT

Golt also includes a minimal fetch() implementation:

const response = await fetch("https://httpbin.org/json");

const data = await response.json();

console.log(data);

Enter fullscreen mode Exit fullscreen mode

Filesystem helpers:

Golt.fs.writeFile("./hello.txt", "Hello from Golt\n");

const content = Golt.fs.readFile("./hello.txt");

console.log(content);

Enter fullscreen mode Exit fullscreen mode

Password hashing and JWT helpers:

const hash = await Golt.crypto.hash("password123");
const ok = await Golt.crypto.compare("password123", hash);

const token = Golt.jwt.sign({ sub: "user_123" }, "secret", 24);
const payload = Golt.jwt.verify(token, "secret");

console.log({ ok, payload });

Enter fullscreen mode Exit fullscreen mode

Docker support

Golt is also available as a Docker image:

docker pull aztekode/golt:latest

Enter fullscreen mode Exit fullscreen mode

You can run a Golt project without installing the runtime locally:

docker run --rm \
  -p 3000:3000 \
  -v "$PWD":/workspace \
  -w /workspace \
  aztekode/golt:latest \
  run app.ts

Enter fullscreen mode Exit fullscreen mode

Or use it as a base image:

FROM aztekode/golt:latest

WORKDIR /app

COPY . .

EXPOSE 3000

CMD ["run", "app.ts"]

Enter fullscreen mode Exit fullscreen mode

This makes it easier to run Golt projects consistently across different environments.

VS Code support

Golt also has a VS Code extension that provides editor typings.

When the extension detects a golt.json file in the workspace, it can generate the required type definitions under .golt/types.

The goal is to keep the CLI focused on the runtime and let the editor extension handle TypeScript developer experience.

Current project status

Golt is still early, but the base runtime is already working.

The current focus is:

  • improving runtime stability
  • improving the CLI
  • improving Docker usage
  • improving documentation
  • keeping the API small and intentional

Future ideas include:

  • better request body helpers
  • improved validation
  • better source map support
  • more polished error messages
  • more production-oriented examples

Links

Final thoughts

Golt started as an experiment around the idea of running TypeScript on top of a Go-powered runtime.

It is not meant to compete directly with Node.js, Deno or Bun. Instead, it explores a smaller runtime model focused on explicit backend primitives.

If you like TypeScript, Go, runtimes, backend tooling or developer experience experiments, I would love to hear your feedback.