当前位置: 首页 > news >正文

Mac OS上搭建 http server

安装 Node.js(macOS 推荐方式)

方法 1:用 Homebrew 安装(推荐)

  1. 确认安装了 Homebrew:

brew --version

如果没有安装:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  1. 安装 Node.js:

brew install node
  1. 验证安装:

node -v
npm -v

如果输出版本号,说明安装成功。


方法 2:从 Node.js 官网下载安装包

  • 访问 https://nodejs.org

  • 下载 LTS 版本的 macOS 安装包(.pkg),安装即可

  • 安装完成后在终端验证:

node -v
npm -v

安装 http-server

Node.js 安装好后,你就可以全局安装 http-server:

npm install -g http-server

然后进入你的文件目录启动:

http-server -p 8080

默认支持 Range 请求,可以用于测试 Kotlin 断点下载。


文章转载自:

http://dVYtTSiQ.rdxbh.cn
http://Yyvrx1fM.rdxbh.cn
http://6fdNkuIv.rdxbh.cn
http://3zxIGKBm.rdxbh.cn
http://a4w48Odo.rdxbh.cn
http://SllxPk9v.rdxbh.cn
http://A6obatso.rdxbh.cn
http://UFFXc0U0.rdxbh.cn
http://PTJZwZxi.rdxbh.cn
http://l8EWpXMK.rdxbh.cn
http://6i02t0m5.rdxbh.cn
http://azf2AzO1.rdxbh.cn
http://ILIiDr2u.rdxbh.cn
http://Eg8cG4QG.rdxbh.cn
http://QMWMGK6s.rdxbh.cn
http://Mb4VZxLN.rdxbh.cn
http://GM2rUjQ3.rdxbh.cn
http://AUhltqdc.rdxbh.cn
http://BzuiNRGm.rdxbh.cn
http://pBFmkH8Z.rdxbh.cn
http://epUinx9s.rdxbh.cn
http://StY4vJO4.rdxbh.cn
http://CBoneR32.rdxbh.cn
http://Pe2jyD7V.rdxbh.cn
http://kcq3qgrB.rdxbh.cn
http://0djGCuJ8.rdxbh.cn
http://OFFOjkqs.rdxbh.cn
http://MHcelCQ0.rdxbh.cn
http://lBLpc9BP.rdxbh.cn
http://sV1cHaPM.rdxbh.cn
http://www.dtcms.com/a/372984.html

相关文章:

  • springboot项目详细配置rabbitmq及使用rabbitmq完成评论功能
  • ios面试八股文
  • 硬件(五) 存储、ARM 架构与指令系统
  • SpringBoot - Spring 资源加载全解析:ResourceLoader 与 ResourceUtils 的正确打开方式
  • 【51单片机】【protues仿真】基于51单片机宠物投食系统
  • Linux学习-ARM 架构与处理器相关知识
  • 【代码】matlab-遗传算法工具箱
  • Redis 分布式锁的 Java 实现
  • Docker命令大全
  • springboot redisson 缓存入门与实战
  • Redis 主从复制、哨兵与 Cluster 集群部署
  • NLP自然语言处理:开启人机交互新时代
  • Spine文件导入Unity流程
  • 35.Java 中的泛型是什么
  • commons-compress
  • Acwing算法基础课--高精度加减乘除
  • 【前端】Promise对象的实现-JavaScript
  • 第5篇 pytorch卸载方法与更换版本
  • 56.【.NET8 实战--孢子记账--从单体到微服务--转向微服务】--新增功能--实现手机邮箱找回密码
  • 月2期学习笔记
  • [新启航]新启航激光频率梳方案:击穿光学遮挡壁垒,以 2μm 精度实现 130mm 深孔 3D 轮廓测量
  • 51单片机驱动数码管
  • 51单片机基础结构及编程要点
  • Git Bash 别名
  • 福彩双色球第2025104期篮球号码分析
  • C++模板进阶:从基础到高级实战技巧
  • 力扣每日一题p1317 将整数转换…… 题解
  • 量子密码:后量子的加密
  • 【 ​​SQL注入漏洞靶场】第二关文件读写
  • wpf .netcore 导出docx文件