BlogMatch/readme.md
Yuan Chiu 67969b005f 從yarn改回npm,並將前端部署用的檔案從git分離
Laravel預設仍是使用npm,若不使用npm的情況下,會造成在跑 `yarn run dev`
的時候,中間有環節會呼叫npm時會出錯。
另外在使用 `npm run dev`
時發現會覆蓋掉有被git算上的前端部屬用的檔案,故修改.gitignore將這些檔案脫離。
2018-08-15 05:46:19 +08:00

46 lines
1.4 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

部落客媒合系統
===
## 安裝所需的開發環境
### Ubuntu 18.04
sudo apt install php mysql-server phpmyadmin php-mbstring php-xml php-zip curl wget libpng-dev
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
sudo cat /etc/mysql/debian.cnf #查詢系統內定的MySQL預設帳號密碼
sudo apt update && apt install nodejs npm
## 專案參數與環境重建
當你Clone下來的專案因為有git採用了 `.gitignore` 機制比較敏感的參數像是APP_KEY、資料庫帳密等與共用的函式庫檔案不會包含進來必須在自己這邊重建。
重建的步驟如下:
### 1. 將你的專案下載回來,並進入此專案目錄
$ git clone <此專案網址>
$ cd BlogMatch
### 2. 安裝PHP相關函式庫
$ composer install
### 3. 安裝前端相關函式庫
$ npm install
### 4. 設定 .env 檔
`.env.example` 複製成 `.env`
並修改裡面的內容如資料庫的相關參數DB_DATABASE=、DB_USERNAME和DB_PASSWORD。
### 5. 重新產生 `APP_KEY`
$ php artisan key:generate
### 6. 重建資料庫
這個專案有包含資料庫遷移(Migration),所以只要下:
$ php artisan migrate
就可以了,資料表都會自動產生
### 7. 重建前端部屬用檔案
$ npm run dev
## 執行此專案
### 快速啟動
$ php artisan serve