› NGINX
› NGINX Trac
› 3rd Party Modules
› Security Advisories
› CHANGES
› OpenResty
› ngx_lua
› Tengine
在线学习资源
› NGINX 开发从入门到精通
NGINX Modules
› ngx_echo
Livid
402.83D
565.56D
V2EX  ›  NGINX

Nginx 未来版本里的 JavaScript 虚拟机

  •  
  •   Livid ·
    PRO
    · Oct 1, 2015 · 6755 views
    This topic created in 4050 days ago, the information mentioned may be changed or developed.
    21 replies  •  2015-10-02 00:20:26 +08:00
    vitovan
    vitovan
    Oct 1, 2015
    1
    WTF!
    shuson
    shuson
    Oct 1, 2015
    2
    不得不说老毛子果然是战斗民族
    LazyZhu
    LazyZhu
    Oct 1, 2015
    3
    Niubility.
    riaqn
    riaqn
    Oct 1, 2015
    5
    用 js 来配置 nginx ? 是这样理解么……
    xfspace
    xfspace
    Oct 1, 2015 via iPad
    6
    这功能。。。不错
    emric
    emric
    Oct 1, 2015
    7
    简直前端狗的春天.
    db520
    db520
    Oct 1, 2015 via Android
    8
    lua 怎么办,有必要又造一个轮子吗?
    wdlth
    wdlth
    Oct 1, 2015
    9
    nodeGINX 要出现了?
    dndx
    dndx
    Oct 1, 2015
    10
    OpenResty 表示压力很大。
    MaiCong
    MaiCong
    Oct 1, 2015 via iPad
    11
    表示期待
    joyee
    joyee
    Oct 1, 2015
    12
    We run a separate VM for each request, so there ’ s no need for garbage collection.

    谁敢做下小白鼠?
    Roope
    Roope
    Oct 1, 2015
    13
    感觉好你还的样子。

    @wdlth nginScript
    love
    love
    Oct 1, 2015
    14
    @joyee 这很好啊,和第一语言 php 一样的运行模式
    kn007
    kn007
    Oct 1, 2015
    15
    xiqingongzi
    xiqingongzi
    Oct 1, 2015
    16
    我说 nginx 的 wiki 咋改版了呢
    Robling
    Robling
    Oct 1, 2015
    17
    不是作为一个模块而是直接嵌入到里面么?
    cylin
    cylin
    Oct 1, 2015
    18
    好棒(/≧▽≦/)
    paulw54jrn
    paulw54jrn
    Oct 1, 2015❤️1
    19
    评论褒贬不一啊

    ```
    You're using JS, which helps the expressivity issue a bit, but in exchange it's inheriting all the problems of JS, and squishing them into my web server, and with no apparent framework for making common and dangerous tasks simple and safe.

    For example, the comment in your second says that unary + applied to a string will "convert upstream number to integer", but that's not true. It converts a String to a Number (including the "number" NaN). +"0.5" is the Number 0.5, which will send you to the server "my_upstream0.5". +"X" is NaN, which will send you to "my_upstreamNaN". Unary + supports scientific notation, too, so "1.2e-100" becomes "my_upstream1.2e-100". It supports hexadecimal integers, too, though that's less interesting when you clamp to [0,1].

    These mis-routings are probably harmless in this case, but it's not hard to imagine similar situations where they're not.

    If the authors of a feature can't use it safely in their trivial demo examples in the product announcement, what confidence do I have that I'm going to be able to make it work reliably and securely on an actual production website?

    --JS Dude
    ```
    secondwtq
    secondwtq
    Oct 1, 2015
    20
    貌似开发者的意思是希望这东西仅仅用来配置 nginx 服务程序,而不是做出一个完整的服务。和 OpenResty 之类还是有分别的。
    zhsj
    zhsj
    Oct 2, 2015 via Android
    21
    世界是 javascript 的
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1381 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 56ms · UTC 22:00 · PVG 06:00 · LAX 14:00 · JFK 17:00
    ♥ Do have faith in what you're doing.