Skip to content

ayanami77/Rhythmate-Service

Repository files navigation

Rhythmate-Service

ゲーム感覚で習慣化を楽しむ「Rhythmate」のバックエンドです。

概要

Rhythmate のバックエンドです。

技術スタック

  • Express
  • TypeScript
  • Prisma
  • postgresql
  • firebase
  • biome
  • jest

環境構築

前提

  1. npm モジュールをインストールする。
$ npm i
  1. .env.exampleをコピーして.envを配置する。
$ cp .env.example .env

express サーバーを立ち上げる

http://localhost:3000で立ち上がります。

$ npm run start:watch

ヘルスチェックのエンドポイントを叩き、サーバー及び DB が起動しているか確認します。

$ curl http://localhost:3000/v1/health
{"status":"ok","message":"Successfully connected to db"}

postgresql を起動する

docker がインストールされていることを前提とします。

  1. コンテナを起動する。
$ make run

もしくは

$ docker compose up -d
  1. コンテナに接続し、ログインする
$ make it-db
$ psql -U rhyth_user -d rhyth_db

prisma の操作

  • マイグレーションを行いたい時
$ npm run migrate
  • DB をリセットして、マイグレーションを行いたい時
$ npm run migrate:reset
  • prisma studio を立ち上げたい時
$ npm run studio

About

Rhythmateのバックエンド

Topics

Resources

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •  

Languages