http-server所用场景: 作为前端的同学来说,想要运行一段代码,但又没有必要使用tomcat或是Apache http server,这个时候,一个简单的轻量的http-server就能搞定. 当前端开发完成后,需要我们打包部署,此时一般就会生成一个dist文件夹,里面存放的是一些静态文件,当我们在编辑器里直接运行这些静态文件时,很可能会出现“because its MIME type ('text/html') is not a supported stylesheet MIME ty…
写在前面 前面两篇文章分别介绍了基于原始socket的web服务器和基于tcpListener的web服务器,本篇文章将继续介绍另外一种基于HttpListener的. HttpListener HttpListener进一步的简化了Http协议的监听,仅需通过字符串的方法提供监听的地址和端口号以及虚拟路径,就可以开始监听工作了. using System; using System.Collections.Generic; using System.Linq; using System.Net…
写在前面 上篇文章根据<asp.net 本质论>书上提供的例子,实现了一个简单的web服务器,本篇文章将介绍另一种实现方式——基于TcpListener的web服务器. TcpListener 命名空间System.Net.Sockets下的TcpListener类简化了基于tcp协议的监听程序. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.…
http://www.lsanotes.cn/install_lighttpd 用Lighttpd做图片服务器 一.安装lighttpd所需的库文件1.安装 pcrewgetftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.10.tar.gz tar -zxvf pcre-8.10.tar.gz cd pcre-8.10 ./configure make make install 2.安装zlibwgethttp://zli…