← REXADEV_CANVAS
Click line numbers to spotlight
server.tsTYPESCRIPT
1
import { createServer } from "node:http";
2
3
interface ApiResponse<T> {
4
status: "success" | "error";
5
data: T;
6
latencyMs: number;
7
}
8
9
const server = createServer(async (req, res) => {
10
const start = performance.now();
11
12
// High-performance tactical routing
13
if (req.url === "/v1/telemetry") {
14
const payload: ApiResponse<{ activeNodes: number }> = {
15
status: "success",
16
data: { activeNodes: 42 },
17
latencyMs: Math.round(performance.now() - start),
18
};
19
20
res.writeHead(200, { "Content-Type": "application/json" });
21
return res.end(JSON.stringify(payload));
22
}
23
});
24
25
server.listen(8080, () => console.log("⚡ Rexakit Server Online"));
⚡ @rexakitREXAKIT DEV CANVAS
EDIT SNIPPET CODE

Code to Image Generator & Dev Tools | 4K Social Cards

RexaKit Dev Canvas turns your code snippets into beautiful, high-resolution 4K images perfect for sharing on Twitter, LinkedIn, tutorials, and slide presentations.

Customize background gradients, window styles (macOS, Windows, minimal), padding, and line highlights to emphasize important parts of your code.

It also includes helpful developer tools: a 5-in-1 JSON transpiler (to TypeScript, Zod, Pydantic, Go, and Rust), a real-time Regex tester, and a visual Git Diff viewer.

Key Benefits

4K Code Screenshot Generator

Create crisp, high-resolution code images with gradients and macOS window frames.

JSON to Types Transpiler

Instantly convert JSON into TypeScript, Zod, Pydantic, Go, and Rust models.

Real-Time Regex Tester

Test regular expressions with instant match highlighting and capture groups.

Visual Git Diff Viewer

Compare two pieces of code side-by-side to see additions and deletions clearly.

50+ Code Languages

Full syntax highlighting for TypeScript, Python, Rust, Go, JavaScript, SQL, and more.

100% Client-Side

Your proprietary code and API payloads are processed entirely on your machine.

Common Use Cases

Social Media & Tutorials

Create attractive, readable code images for Twitter/X, LinkedIn, and technical blog posts.

API Data Modeling

Turn API response JSON into type-safe TypeScript interfaces or Zod schemas in seconds.

Testing Regex Patterns

Debug and test email, URL, or string validation regex patterns with live matches.

Reviewing Code Changes

Paste two versions of a script to review exact line changes before committing.

Frequently Asked Questions

Dev Canvas exports at high 4K resolution, ensuring crisp text on Retina screens, social media feeds, and presentations.