mac怎样搭建node.js

2025-04-08 22:50:00

1、官网下载node.js并安装

mac怎样搭建node.js
mac怎样搭建node.js

2、打开终端,执行以下命令,下载node.js的管理套件

mac怎样搭建node.js

3、执行命令,更新npm

mac怎样搭建node.js

4、验证是否安装成功

mac怎样搭建node.js

5、终端输入vim helloworld.js,然后输入以下测试代码,并执行esc -> : -> wq保存

mac怎样搭建node.js

6、终端输入启动命令

mac怎样搭建node.js

7、浏览器输入,http://127.0.0.1:8888/,那么会显示hello world, 就说明成功。

mac怎样搭建node.js
声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
猜你喜欢