Giter Site home page Giter Site logo

kohey-1642 / nextjs-laravel-hands-on Goto Github PK

View Code? Open in Web Editor NEW

This project forked from shimotaroo/nextjs-laravel-hands-on

0.0 0.0 0.0 288 KB

Next.js+Laravelの簡易アプリケーション開発のハンズオン

Shell 0.82% JavaScript 0.29% PHP 71.19% TypeScript 10.55% CSS 1.52% Makefile 0.52% Blade 14.17% Dockerfile 0.93%

nextjs-laravel-hands-on's Introduction

Next.js×Laravelで開発する簡易アプリケーションのハンズオン

前提

  • M1Macにも対応しています!
  • Windowsでの動作確認は行っておらず環境構築のエラー対応はできないので悪しからず...

使用技術

  • frontend: TypeScript/React/Next.js/Tailwind CSS
  • backend(api): PHP/Laravel
  • infra: Docker/Docker Compose

ブランチ指定でclone

git clone -b init https://github.com/shimotaroo/nextjs-laravel-hands-on.git

DB用Dockerfileの修正(M1Mac以外)

.docker/db/Dockerfileを修正

- FROM --platform=linux/x86_64 mysql:8.0
+ FROM mysql:8.0

ENV TZ=UTC

COPY my.cnf /etc/my.cnf

環境構築

make init

以下の状態になればOK

api(Laravel)

  • apiディレクトリ内にLaravelがインストールされている
  • localhost:80にアクセスするとLaravelのウェルカムページが表示される

frontend(Next.js)

  • frontディレクトリ内にNext.jsがインストールされる
  • localhost:3000にアクセスするとログイン画面が表示される

スクリーンショット 2022-01-24 23 55 13

  • localhost:3000/memosにアクセスするとメモ一覧画面が表示される

スクリーンショット 2022-01-24 23 55 31

  • localhost:3000/memos/postにアクセスすると登録画面が表示される

スクリーンショット 2022-01-24 23 55 49

GUIツールでDBに接続

  • Sequel Ace
  • Table Plus

等のGUIツールでDB(MySQL)に接続。(以下接続情報)

ホスト: 127.0.0.1 ユーザー: sample パスワード: sample データベース: next_laravel

Next.jsの開発用サーバーの起動・停止

  • 起動: make dev
  • 停止: control + c

nextjs-laravel-hands-on's People

Contributors

shimotaroo avatar

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.