OldBigBuddha / fastify-rest-api-template

Fastify で REST API を作るときのテンプレート

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

REST API Template ~ Fastify version ~

MIT Nodejs v16.13.1 Verify

TypeScript と Fastify を用いた REST API 開発用のテンプレートです。

注意: 開発前に npm run prepare を実行する。

開発環境

開発環境には Docker を使っています。docker/dev で以下のコマンドを実行すると開発用のコンテナが立ち上がり、サーバーが起動します。

$docker-compose up -d --build

デバッグを行う場合は以下のコマンドを使うと即座にログを確認できます。

$docker-compose up -d --build && docker compose logs -f app

コンテナを破棄したい場合は以下のコマンドを実行します。

$docker-compose down -v

TODO

  • Routing
  • Lint / Formatter
    • Git Hook
  • Helmet
    • CSRF
    • CORS
  • Config file
  • DB(Postgres SQL)
    • Docker Compose for developing
  • Authentication(JWT)
  • Dependency Injection
  • GitHub Actions
  • Containerize for hosting
  • i18n

Author

(c) OldBigBuddha 2021.

About

Fastify で REST API を作るときのテンプレート

License:MIT License


Languages

Language:TypeScript 82.6%Language:Shell 13.8%Language:JavaScript 1.9%Language:Dockerfile 1.6%