安装 adonisjs
检测当前版本
node -v
v8.9.1 至少8以上版本
npm -v
6.1.0 至少3以上版本
全局安装 adonisjs
npm i @adonisjs/cli -g
安装完成以后查看帮助信息
adonis --help
创建应用
adonis new boloog-adonis
_ _ _ _
/ \ __| | ___ _ __ (_)___ | |___
/ _ \ / _` |/ _ \| '_ \| / __|_ | / __|
/ ___ \ (_| | (_) | | | | \__ \ |_| \__ \
/_/ \_\__,_|\___/|_| |_|_|___/\___/|___/
[1/6] 🔬 Requirements matched [node & npm]
[2/6] 🔦 Ensuring project directory is clean [boloog-adonis]
[3/6] 📥 Cloned [adonisjs/adonis-fullstack-app]
[4/6] 📦 Dependencies installed
[5/6] 📖 Environment variables copied [.env]
[6/6] 🔑 Key generated [adonis key:generate]
🚀 Successfully created project
👉 Get started with the following commands
$ cd boloog-adonis
$ adonis serve --dev
把模板创建到github项目下
adonis new boloog-adonis --blueprint boloog/boloog-adonis-blueprint
进入目录然后启动服务
cd boloog-adonis
adonis serve --dev
http://127.0.0.1:3333/