iT邦幫忙

3

Node.js 的Java版

  • 分享至 

  • xImage
  •  

Node.js在2012年興起, 這是異步應用系統, 當然在JVM平台上也有,在此簡單介紹可以用Javascript, Ruby, Python,Groovy, 和Java開發的異步應用發展系統Vert.x
幾個步驟, Vert.x向世界說Hello World!

  1. http://vertx.io/downloads.html下載.
  2. 解開下載檔, 丟到一個目錄中, 設定PATH,
  3. 寫一隻簡單的程式server.js
    $ cat server.js
    load('vertx.js');
    vertx.createHttpServer().requestHandler(function(req) {
    req.response.end("Hello World!");
    }).listen(8080, 'localhost');
  4. 啟動vert.x
    $ vertx run server.js
  5. 瀏覽http://localhost:8080/
    Hello World!

圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言