Skip to content

This is the start kit with use mongodb + cloudflare workers + honojs run on serverless envronment.

License

Notifications You must be signed in to change notification settings

thedhruvish/hono-mongodb

Repository files navigation

Hono - MongoDB

Tech Stack

Getting Started

  1. Clone the repository:
git clone https://github.com/thedhruvish/hono-mongodb.git
cd hono-mongodb
  1. Install dependencies:
npm install
  1. Configure environment:
    • Create .dev.vars file in root directory:
    MONGODB_URI="your_mongodb_connection_string"

Deployment

Development

npm run dev

Production

  1. Set production secrets:
npx wrangler secret put MONGODB_URI
  1. Deploy to Cloudflare:
npm run deploy

Type Generation

Sync Cloudflare bindings with:

npm run cf-typegen

Project Structure

src/
├── db/          # Database connection logic
├── routes/      # API endpoint handlers
├── types/       # TypeScript type definitions
└── index.ts     # Main application entry

Environment Variables

  • MONGODB_URI: MongoDB connection string
  • (Production) Set via wrangler secret put

Contributing

Feel free to fork the repository and submit pull requests. For major changes, please open an issue first to discuss what you would like to change.

Contact

License

MIT License - See LICENSE

About

This is the start kit with use mongodb + cloudflare workers + honojs run on serverless envronment.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published