mac上如何使用node.js

【字号: 日期:2022-09-29浏览:33作者:雯心

问题描述

在mac机上如何安装使用Node.js,如何搭建服务器,启用服务器,测试等等。

问题解答

回答1:

当然是参考官方文档最好:https://nodejs.org/en/download/。

回答2:

brew install nodebrew install nginxnpm install expressnpm install pm2 -gpm2 start bin/www修改 nginx.conf 添加 server 反向代理修改hosts访问你的项目

大概就这么个流程,仅供参考

回答3:

楼上说的都可以,补充一个用 nvm 安装

curl -o- https://raw.githubusercontent... | bash

nvm install node详细看这里:https://github.com/creationix...

相关文章: