A powerful Hono Backend with Drizzle and Postgres for Node.js/Bun
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.
- 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
To install dependencies:
bun install
Initialize your project:
railway init
Open the link and deploy REST API with DB
on Railway
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
To run the application locally, execute the following command in your terminal:
bun run dev
Open URL in the browser
http://localhost:3001/users
To deploy the bot on Railway:
railway up --detach