安裝腳手架工具
brew install lean-cli
在mac的安裝過程中可能會出現(xiàn)以下提示:
Error: The following directories are not writable by your user:
/usr/local/share/man/man5
/usr/local/share/man/man7
You should change the ownership of these directories to your user.
sudo chown -R $(whoami) /usr/local/share/man/man5 /usr/local/share/man/man7
意思是沒有權(quán)限,按照提示運行下面的命令即可
sudo chown -R $(whoami) /usr/local/share/man/man5
登錄leanclound
在控制臺創(chuàng)建項目
登錄leanclound,進(jìn)入控制臺,創(chuàng)建應(yīng)用
初始化項目
執(zhí)行lean init
摘符, 選擇初始化哪一個項目奕翔,并選擇nodejs框架
image.png
執(zhí)行npm i
安裝依賴
執(zhí)行lean up
啟動項目
用瀏覽器打開 http://localhost:3000/, 出現(xiàn)以下頁面即為成功
image.png