如何快速用NodeJS在任何地方搭建一个HttpServer?

2026-04-02 00:510阅读0评论SEO基础
  • 内容介绍
  • 文章标签
  • 相关推荐

本文共计217个文字,预计阅读时间需要1分钟。

如何快速用NodeJS在任何地方搭建一个HttpServer?

anywhere会自动打开index.。npminstall anywhere-gcd,想以某个路径作为静态文件服务器的根目录,只需在该目录下执行。只需在相应目录下执行+anywhere。默认不添加-s,命令会在命令点击后同时执行。

anywhere会自动打开index.htmlnpminstallanywhere-gcd想要以某个路径作为静态文件服务器的根目录分享只需要在该目录下执行只需要在该目录下执行

anywhere

默认不添加 -s 命令会在命令敲击后同时打开浏览器访问 ipv4地址:8000/ 这个路径。

anywhere -p 8000 // 指定静态服务器的端口号 anywhere -s // 静默执行不打开浏览器

www.cnblogs.com/mrblue/p/6149849.html

NodeJS 最快速搭建一个HttpServer

如何快速用NodeJS在任何地方搭建一个HttpServer?

node.js最快速搭建一个HttpServer

 

先下载 http-server

npm install http-server -g

 

在目录里放一个index.html

1

2

cd D:\Web\InternalWeb

start http-server -i -p 8081 -a 127.0.0.1

本文共计217个文字,预计阅读时间需要1分钟。

如何快速用NodeJS在任何地方搭建一个HttpServer?

anywhere会自动打开index.。npminstall anywhere-gcd,想以某个路径作为静态文件服务器的根目录,只需在该目录下执行。只需在相应目录下执行+anywhere。默认不添加-s,命令会在命令点击后同时执行。

anywhere会自动打开index.htmlnpminstallanywhere-gcd想要以某个路径作为静态文件服务器的根目录分享只需要在该目录下执行只需要在该目录下执行

anywhere

默认不添加 -s 命令会在命令敲击后同时打开浏览器访问 ipv4地址:8000/ 这个路径。

anywhere -p 8000 // 指定静态服务器的端口号 anywhere -s // 静默执行不打开浏览器

www.cnblogs.com/mrblue/p/6149849.html

NodeJS 最快速搭建一个HttpServer

如何快速用NodeJS在任何地方搭建一个HttpServer?

node.js最快速搭建一个HttpServer

 

先下载 http-server

npm install http-server -g

 

在目录里放一个index.html

1

2

cd D:\Web\InternalWeb

start http-server -i -p 8081 -a 127.0.0.1