Giter Club home page Giter Club logo

hono-api-starter's Introduction

Hono API Starter

πŸš€ Modern DX friendly starter for Node.js/Hono APIs with the focus on simplicity and robustness.

Features

  • ✨ Node 20
  • πŸ”Ή TypeScript 5
  • ❀️ Monorepo setup with Turbo and npm workspaces
  • πŸ”₯ Auto reloading support for monorepo setup
  • πŸš€ Turbo pipeline to run tasks
  • βœ… Type and runtime safe environment variables
  • πŸ”’ Secure headers by default for APIs
  • πŸ›‘οΈCORS
  • πŸ“š Robust logger (credits to Practica)
  • πŸ†” Unique request ID (credits to Practica)
  • 🚫 Strict linting and type checking rules
  • 🐢 Husky for Git Hooks
  • πŸ“” Lint git commit with Commitlint
  • 🦺 Unit Testing with native Node.js test runner
  • πŸ“¦ Optimized esbuild production artifact
  • 🐳 Production ready Dockerfile for deployment

General setup

Manage your Node.js version automatically with Volta

Clone the repository

git clone https://github.com/supersoniko/hono-api-starter.git

Install dependencies

npm i

Cat Topia Application

Development Server

npm run turbo:start:dev:cat-topia
open http://localhost:8000

Production simulation

# Only build JavaScript output
npm run turbo:build:app:cat-topia
# Build and run JavaScript output
npm run turbo:start:app:cat-topia
open http://localhost:8000

Production deploy to Fly

This will require Fly.io CLI to be installed.

flyctl launch
flyctl deploy

API Specification

The API specification is written in RapidAPI/Paw.

The specification can be be found in the root folder hono-starter-api-spec.paw.

Debugging with VS Code

Start any application in debug mode

npm run turbo:start:debug:cat-topia

Attach debugger in VS Code

Go to the Command Pallete (⇧+⌘+P on macOS), and search for the action "Debug: Attach to Node process".

Choose the node process that looks like this: node --inspect -r ts-node/register -r tsconfig-paths/register ./src/entry-points/api/server.ts.

View the VS Code Debug Actions documentation for more information regarding the use of their debugger.

hono-api-starter's People

Contributors

supersoniko avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

benmerken

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.