xuboying
V2EX  ›  Windows

win 下 http server 程序求推荐

  •  
  •   xuboying · Mar 31, 2016 · 4092 views
    This topic created in 3870 days ago, the information mentioned may be changed or developed.

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

    19 replies  •  2016-05-05 10:35:53 +08:00
    g00001
    g00001
    Mar 31, 2016❤️1
    1
    用 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();
    realpg
    realpg
    Mar 31, 2016 via Android❤️1
    3
    有个 tinyhttpserver
    c 写的 德国人写的 游戏源代码
    不知道还萌不萌找到 当年还没 github 时候在国外搜到的
    josephshen
    josephshen
    Mar 31, 2016 via iPad❤️1
    4
    Nodejs with http-server, fast and easy to use.
    xuboying
    xuboying
    OP
    Mar 31, 2016
    5
    感谢各位
    @9hills @g00001 @josephshen @realpg
    这个 win 版 nginx 是我想要的
    脚本语言实现的还要带运行库,通常太大了
    dphdjy
    dphdjy
    Mar 31, 2016 via Android❤️1
    6
    @xuboying 不不 lua/nodejs 都不大
    liyvhg
    liyvhg
    Mar 31, 2016 via Android❤️1
    7
    httpfileserver
    josephshen
    josephshen
    Mar 31, 2016 via iPad❤️1
    8
    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
    xspoco
    Mar 31, 2016❤️1
    9
    Everything
    6IbA2bj5ip3tK49j
    6IbA2bj5ip3tK49j
    Mar 31, 2016❤️1
    10
    1 , EveryThing
    2 ,如果你用 Python ,可以用 simpleHTTPServer
    3 ,小众软件最近推荐的: http://www.appinn.com/caddy-server/
    Andy1999
    Andy1999
    Mar 31, 2016 via iPhone❤️1
    11
    IIS 8.5+ 默秒全
    lm902
    lm902
    Mar 31, 2016 via iPhone
    12
    @g00001 嗯?什么语言
    flynaj
    flynaj
    Mar 31, 2016 via Android
    13
    nginx
    flynaj
    flynaj
    Mar 31, 2016 via Android
    14
    golang
    package main
    import (
    "net/http"
    )
    func main() {
    http.Handle("/", http.FileServer( http.Dir("/tmp/static/")))
    http.ListenAndServe(":8080", nil)
    }
    alex321
    alex321
    Mar 31, 2016
    15
    Caddy/Nginx
    yamada
    yamada
    Mar 31, 2016
    16
    c# 中的 httplistener
    ivmm
    ivmm
    Mar 31, 2016
    17
    IIS10 秒全家
    SmiteChow
    SmiteChow
    Mar 31, 2016
    18
    caddy+1
    Vicer
    Vicer
    May 5, 2016 via Android
    19
    HFS 图形化配置,也就几兆吧
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1538 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 48ms · UTC 18:11 · PVG 02:11 · LAX 10:11 · JFK 13:11
    ♥ Do have faith in what you're doing.