http-server搭建本地环境

http-server 是一个简单的零配置命令行HTTP服务器, 基于nodeJs.

全局安装:

npm install http-server -g

用法:

http-server [path] [options]

Usage

Starting http-server locally

node bin/http-server

Now you can visit http://localhost:8080 to view your server

node bin/http-server -p80指定端口

映射本地的文件 (mac):

sudo node Desktop/http-server/bin/http-server Desktop/themes -p80

你可能感兴趣的:(http-server搭建本地环境)