env 本地环境
npm config set sharp_binary_host "https://npm.taobao.org/mirrors/sharp"
npm config set sharp_libvips_binary_host "https://npm.taobao.org/mirrors/sharp-libvips"
npm install sharp
env 环境配置
安装:
git clone https://github.com/whitexiong/laravue.git
cd laravue
# Migration and DB seeder (after changing your DB settings in .env)
php artisan migrate --seed
# Install dependency with NPM
npm install
# develop
npm run dev # or npm run watch
# Build on production
npm run production
docker-compose up -d
Build static files within Laravel container with npm
# Get laravel docker container ID from containers list
docker ps
docker exec -it <container ID> npm run dev # or npm run watch
# Where <container ID> is the "laravel" container name, ex: src_laravel_1
Open http://localhost:8000 (laravel container port declared in docker-compose.yml
) to access Laravue