开发环境搭建
根据自身情况直接装 mac 开发环境,或选用Valet或者Docker搭建
使用Valet
安装
- Homebrew, run
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- Composer, run
brew install composer
- Xcode Download from App Store
- run
xcode-select --install
- run
brew install homebrew/php/php70
- run
brew install --HEAD homebrew/php/php70-memcached
- Valet, run
composer global require laravel/valet
, add~/.composer/vendor/bin
to $PATH, runvalet install
- (optional if using local db)
mariadb
runbrew install mariadb
配置
mkdir ~/Sites && cd ~/Site && valet park
valet domain app
orvalet domain your-sub-domain.xmxdev.com
git clone https://github.com/wt1098078873/Blog_Hexo.git web
cd web
cp .env.example .env
配置.env
composer install --no-scripts
安装PHP依赖库npm install
安装前端编译组件
运行
- (optional if using local db) run
brew services start mariadb
- 打开
http://web.dev
来查看网站