//开启apache: sudo apachectl start
//重启apache: sudo apachectl restart
//关闭apache: sudo apachectl stop
http://127.0.0.1/ 测试下
编写好的html文件放到/Library/WebServer/Documents
http://127.0.0.1/test 访问
二.用JSON-server模拟数据
1. 安装 sudo npm install json-server -g
2.安装完成后可以用 json-server -h 命令检查是否安装成功
如果版本不对
json-server requires at least version 8 of Node, please upgrade
解决办法
1.sudo npm cache clean -f
2. sudo npm install -g n
3.sudo n stable
3.创建db.json json-server db.json
4.
把db.json
文件托管成一个 web 服务。
json-server --watch --port 53000 db.json
5.电脑打开http://localhost:53000/JSON
未完
https://www.cnblogs.com/fly_dragon/p/9150732.html
https://blog.csdn.net/zhilinchn/article/details/82826028#GET_72
三 内网穿透ngrok