您的位置:首页 > Web前端

关于建立本地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服务器

     
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息