/nextjs-ts-redux-node-template

フルスタックアプリサンプル

Primary LanguageTypeScript

フルスタックアプリ

Requirement

  • asdf
  • docker

Stack

  • Monorepo
  • Yarn Workspace

Frontend

  • React
  • Next.js
  • TypeScript
  • Redux
  • axios

Backend

  • Node.js
  • TypeScript
  • express
  • prisma(入れる予定)
  • PostgreSQL

Starting

クローンして必要なライブラリなどを準備

git clone git@github.com:makoto-developer/nextjs-ts-redux-node-template.git
cd nextjs-ts-redux-node-template
asdf install
# yarnがなければインストールする
brew install yarn

.envを用意する

cp backend/.env.example backend/.env
cp frontend/.env.example frontend/.env
cp docker/.env.example docker/.env

パスワードとかポートとか適宜修正する

vi .env

データベースを立ち上げる

cd docker
docker compose up -d

# PostgreSQLが起動したことを確認する
docker ps -a

seedsを使って初期データを投入する

seeds/user.sql

バックエンドを起動

yarn bdev

フロントエンドを起動

yarn fdev

Linter

コードを修正したら実行する

# lintチェック
yarn lint

# lint エラーが発生している箇所を可能な限り修正
yarn lint-fix

# scssファイルのスタイル修正
yarn lint-style-fix