如何使用 Node 或 ClojureScript 在命令行的当前文件夹中启动 Web 服务器?
How to start a web server in the current folder on the command line using Node or ClojureScript?
要在命令行的当前目录中启动 Web 服务器,我正在使用:
python -m SimpleHTTPServer
我想使用 Node 或 ClojureScript 执行此操作。
我的问题是:如何使用 Node 或 ClojureScript 在命令行的当前文件夹中启动 Web 服务器?
来自Big list of http static server one-liners
$ npm install -g http-server # install dependency
$ http-server -p 8000
或
$ npm install -g node-static # install dependency
$ static -p 8000
要在命令行的当前目录中启动 Web 服务器,我正在使用:
python -m SimpleHTTPServer
我想使用 Node 或 ClojureScript 执行此操作。
我的问题是:如何使用 Node 或 ClojureScript 在命令行的当前文件夹中启动 Web 服务器?
来自Big list of http static server one-liners
$ npm install -g http-server # install dependency $ http-server -p 8000
或
$ npm install -g node-static # install dependency $ static -p 8000