All Templates / Starters

REST API with DB

REST API with DB

A powerful Hono Backend with Drizzle and Postgres for Node.js/Bun

Deploy REST API with DB

railway-rest-api-with-db

aeither/railway-rest-api-with-db

Just deployed

Postgres

railwayapp-templates/postgres-ssl:latest

Just deployed

/var/lib/postgresql/data

REST API with DB

A powerful Hono Backend with Drizzle and Postgres for Node.js/Bun

Deploy on Railway

Overview

This project demonstrates a robust REST API built with Hono, using Drizzle ORM for database operations with PostgreSQL. It's designed to run on Bun, providing a fast and efficient backend solution. The project structure allows for easy deployment on Railway, making it ideal for rapid development and scaling.

Key Features

  • Fast REST API using Hono framework
  • Database integration with Drizzle ORM and PostgreSQL
  • Runs on Bun for improved performance
  • Easy deployment to Railway
  • Health check endpoint for monitoring
  • User management API endpoint
  • Dockerized for consistent environments

Setup

To install dependencies:

bun install

Set up your .env file with your database URL:

DATABASE_URL=your_postgres_url_here

DB

To generate database migrations, use the following command:

bun run db:generate

To apply the generated migrations to the database, run:

bun run db:push

To seed the database with sample data, execute:

bun run db:seed

Develop

To run the application locally, execute the following command in your terminal:

bun run dev

Deploy

Initialize your project:

railway init

To deploy the bot on Railway:

railway up

Remember to set the DATABASE_URL environment variable in your Railway project settings.

DATABASE_URL

Learn More


Deploy Now

Details

John Fu Lin's Projects

Created on Jul 30, 2024

14 total projects

5 active projects

100% success on recent deploys

TypeScript, Dockerfile

Starters



More templates in this category

View Template
Angular 19

Angular 19

A framework for building single-page applications using TypeScript


Dango

View Template
mellow-vue

mellow-vue

A full-stack Vue app with The Boring JavaScript Stack.


My Workspace

View Template
.NET8 Web API

.NET8 Web API

A basic ASP.NET Core Web API template (.NET 8)


Dango