---
title: "Deploy HTMX + Hono + JSX + Postgres"
description: "HTMX + Hono + JSX + TypeScript + PostgreSQL. Lightweight Node, typed views."
category: "Starters"
url: https://railway.com/deploy/htmx-hono-jsx-postgres
---

# Deploy HTMX + Hono + JSX + Postgres

HTMX + Hono + JSX + TypeScript + PostgreSQL. Lightweight Node, typed views.

**[Deploy HTMX + Hono + JSX + Postgres on Railway](https://railway.com/template/htmx-hono-jsx-postgres)**

- **Creator:** André Ahlert
- **Category:** Starters

## Template content

### Postgres https://devicons.railway.app/i/postgresql.svg

- **Image:** ghcr.io/railwayapp-templates/postgres-ssl:18

### web https://raw.githubusercontent.com/atoolz/railway-htmx-node-hono-jsx-pg/master/assets/icon.svg

- **Source:** https://github.com/atoolz/railway-htmx-node-hono-jsx-pg
- **Health check:** /health
- **Public domain:** Yes

## Documentation

# Deploy and Host HTMX Hono JSX Postgres on Railway

HTMX Hono JSX Postgres is a **TypeScript** starter: **HTMX** drives the UI from HTML over the wire, **Hono** is a small, fast HTTP layer on **Node**, **JSX** (Hono’s) types your server-rendered components, and **PostgreSQL** backs the app. You get a Todo demo that shows partial swaps and typed views without shipping a browser bundle for your own components.

## About Hosting HTMX Hono JSX Postgres

Deploy the **Node** service with the repo’s **Dockerfile**; production runs compiled **TypeScript** from `dist/`. The app uses **`pg`** with pooling, **`DATABASE_URL`**, and Railway’s **`PORT`**. **Migrations on startup** provision the schema. **HTMX** and **Tailwind** are CDN-loaded—no Vite/webpack for the demo UI. Hono’s **`c.html()`** returns JSX-rendered fragments ideal for **HTMX** targets. Point Postgres via **private networking** and set Railway health checks to **`GET /health`** (DB-aware JSON). This fits teams who want **Hono’s footprint** and **TS end-to-end** while staying in the hypermedia style.

## Common Use Cases

- **Type-safe** server JSX + HTMX for internal apps and prototypes.
- Exploring **Hono on Node** with a real DB and HTML-first UX.
- A middle ground between **Express** and heavier full-stack frameworks.

## Dependencies for HTMX Hono JSX Postgres Hosting

- **Railway PostgreSQL** in the project.
- **`DATABASE_URL`** on the Hono service (e.g. `${{Postgres.DATABASE_URL}}`).

### Deployment Dependencies

- [HTMX documentation](https://htmx.org/docs/)
- [Hono](https://hono.dev/docs/)
- [Hono JSX](https://hono.dev/docs/guides/jsx)
- [node-postgres (pg)](https://node-postgres.com/)

### Implementation Details

- Health: `GET /health` — JSON; uses `SELECT 1` via the pool.
- Source: `src/index.tsx` and `src/views/`; build step in Docker.

## Why Deploy HTMX Hono JSX Postgres on Railway?


Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying HTMX Hono JSX Postgres on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.


## Similar templates

- [open-excalidraw](https://railway.com/deploy/open-excalidraw) — Self-hostable collaborative drawing built on Excalidraw
- [caring-vibrancy](https://railway.com/deploy/caring-vibrancy) — Deploy and Host caring-vibrancy with Railway
- [Flask WebSocket Chat](https://railway.com/deploy/flask-websocket-chat) — Single file, realtime multi-user websocket chat using flask-socketio

Open this page in a browser: https://railway.com/deploy/htmx-hono-jsx-postgres
