Skip to content

Lightweight Honojs rest api template for side project or micro Saas on cloudflare workers

License

Notifications You must be signed in to change notification settings

TheSmartMonkey/create-hono-cloudflare-workers-rest-api

Repository files navigation

create-hono-cloudflare-workers-rest-api

🚀 Welcome to HonoJS REST API Template 🚀

Features

🛠️ Minimal Setup, Maximum Power

⚙️ Middleware Magic

🔐 JWT token Authentication

✅ Route validation with zod

🧪 Testing with jest

🦋 Beautiful code with eslint and prettier

Getting Started

npx degit https://github.com/TheSmartMonkey/create-hono-cloudflare-workers-rest-api backend

Create a wrangler.toml based on wrangler.default.toml

Install dependancies

bun i

Start coding 🧑‍💻

bun start

Deploy to cloudflare 🚀

bun run deploy

Testing

Test you code 🧪

bun run test

Run Specific Tests

Run unit tests 🧪 Test individual components or functions

bun run unit

Run integration tests 🧪 Test your code with external dependencies like databases, APIs, etc

bun run integration

Grouping Tests

Tests are grouped using Jest's @group annotation:

/**
 * @group unit
 */
/**
 * @group integration
 */

This helps in organizing and running specific groups of tests

More Commands

Fix you code to make it Beautiful 🦋

bun run fix

For more commands:

bun run

Encode a JWT token: JWT Encoder/Decoder

Happy coding! 🎉

About

Lightweight Honojs rest api template for side project or micro Saas on cloudflare workers

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published