关于建立本地web服务器的几种方法
2016-03-15 15:28
281 查看
一、用python ------- 适合大多数UNIX/Mac系统
大多数的UNIX/Mac系统都已经安装了python,在这些系统中很容易地建立本地web服务器
>python -m SimpleHTTPServer
Serving HTTP on 0.0.0.0 port 8000..
在你签出或下载的源代码目录下运行上述命令
二、用NPM --------如果你已经安装了Node,js
第一种使用 http server 模块:
>npm install -g http-server
>http-server
Starting up http-server, serving ./ on port : 8080
Hit CTRL-C to stop the server
第二种 Simple HTTP Server:
>npm install -g simple-http-server
>nserver
simple-http-server Now Serving: /Users.jos/git/Physijs at http://localhost:8000/
三、用Mongoose
首先,从https://code.google.com/p/mongoose/downloads/list下载特定平台的二进制文件,如果是windows平台,把文件复制到示例所在的目录,双击它,即可启动一个web服务器
大多数的UNIX/Mac系统都已经安装了python,在这些系统中很容易地建立本地web服务器
>python -m SimpleHTTPServer
Serving HTTP on 0.0.0.0 port 8000..
在你签出或下载的源代码目录下运行上述命令
二、用NPM --------如果你已经安装了Node,js
第一种使用 http server 模块:
>npm install -g http-server
>http-server
Starting up http-server, serving ./ on port : 8080
Hit CTRL-C to stop the server
第二种 Simple HTTP Server:
>npm install -g simple-http-server
>nserver
simple-http-server Now Serving: /Users.jos/git/Physijs at http://localhost:8000/
三、用Mongoose
首先,从https://code.google.com/p/mongoose/downloads/list下载特定平台的二进制文件,如果是windows平台,把文件复制到示例所在的目录,双击它,即可启动一个web服务器
相关文章推荐
- html5 web数据存储
- SEO
- 异步流程控制:7 行代码学会 co 模块
- [译] React 入门
- 如何优雅处理前端异常?
- 深入探讨前端框架react
- Express实现前端后端通信上传图片之存储数据库(mysql)傻瓜式教程(一)
- 自己动手写的javascript前端等待控件
- 前端必备神器 Snap.svg 弹动效果
- 一张Web前端的思维导图分享
- 一道常被人轻视的web前端常见面试题(JS)
- 浅谈AngularJS--基础
- 浅谈AngularJS--域变量(scope)
- AngularJS' Internals In Depth(深入理解 AngularJS)
- 3ff8 javascript 获取Flash下载进度兼容IE, FireFox,Chrome浏览器
- CSS清除浮动常用方法小结
- window.external 的用法(收藏夹功能)
- document.all用法
- 5种CSS实现的垂直居中