win 下 http server 程序求推荐

2016-03-31 15:37:27 +08:00
 xuboying

想在图形化程序中集成一个 http server ,只要能显示静态页面就行,要求小巧,不超过几兆,最好有命令行参数

3102 次点击
所在节点    Windows
19 条回复
g00001
2016-03-31 15:47:35 +08:00
用 aardio 生成一个迷你 HTTP 服务器 + 浏览器壳子界面,也就几百 KB ,还支持类似 PHP 的模板语言,示例代码:

import win.ui;
/*DSG{{*/
var winform = win.form(text="HTTP 服务器已启动";right=759;bottom=469)
/*}}*/

import web.form;
var wb = web.form( winform);

import wsock.tcp.simpleHttpServer;
wb.go( wsock.tcp.simpleHttpServer.startUrl() + "/index.html" );

winform.show();
win.loopMessage();
9hills
2016-03-31 15:48:24 +08:00
realpg
2016-03-31 15:58:05 +08:00
有个 tinyhttpserver
c 写的 德国人写的 游戏源代码
不知道还萌不萌找到 当年还没 github 时候在国外搜到的
josephshen
2016-03-31 16:08:22 +08:00
Nodejs with http-server, fast and easy to use.
xuboying
2016-03-31 16:21:27 +08:00
感谢各位
@9hills @g00001 @josephshen @realpg
这个 win 版 nginx 是我想要的
脚本语言实现的还要带运行库,通常太大了
dphdjy
2016-03-31 16:33:58 +08:00
@xuboying 不不 lua/nodejs 都不大
liyvhg
2016-03-31 16:35:52 +08:00
httpfileserver
josephshen
2016-03-31 16:52:51 +08:00
Pack nodejs with UPX, the executable size can be just 4mb, with the http-server module the total size will no more than 4.2mb. Although it is still bigger than nginx, you will find it more easy to use and configure.
xspoco
2016-03-31 16:56:51 +08:00
Everything
6IbA2bj5ip3tK49j
2016-03-31 17:02:55 +08:00
1 , EveryThing
2 ,如果你用 Python ,可以用 simpleHTTPServer
3 ,小众软件最近推荐的: http://www.appinn.com/caddy-server/
Andy1999
2016-03-31 17:03:42 +08:00
IIS 8.5+ 默秒全
lm902
2016-03-31 17:08:03 +08:00
@g00001 嗯?什么语言
flynaj
2016-03-31 21:05:46 +08:00
nginx
flynaj
2016-03-31 21:12:57 +08:00
golang
package main
import (
"net/http"
)
func main() {
http.Handle("/", http.FileServer( http.Dir("/tmp/static/")))
http.ListenAndServe(":8080", nil)
}
alex321
2016-03-31 21:18:06 +08:00
Caddy/Nginx
yamada
2016-03-31 21:18:43 +08:00
c# 中的 httplistener
ivmm
2016-03-31 21:19:18 +08:00
IIS10 秒全家
SmiteChow
2016-03-31 22:12:41 +08:00
caddy+1
Vicer
2016-05-05 10:35:53 +08:00
HFS 图形化配置,也就几兆吧

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/267659

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX