node.native

C++11 port for the Node: native performance and modern simplicity.

  • 所有者: d5/node.native
  • 平台:
  • 許可證: MIT License
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

node.native

node.native is a C++11 (aka C++0x) port for node.js.

Please note that node.native project is under heavy development.

I'm working on the first release at v0.1.0 branch.

Sample code

Simplest web-server example using node.native.

#include <iostream>
#include <native/native.h>
using namespace native::http;

int main() {
    http server;
    if(!server.listen("0.0.0.0", 8080, [](request& req, response& res) {
        res.set_status(200);
        res.set_header("Content-Type", "text/plain");
        res.end("C++ FTW\n");
    })) return 1; // Failed to run server.

    std::cout << "Server running at http://0.0.0.0:8080/" << std::endl;
    return native::run();
}

Getting started

node.native consists of header files(*.h) only, but requires libuv and http-parser lib to use.

To compile included sample application(webserver.cpp) first run the following command in the project directory:

git submodule update --init

then,

make

alternatively you can set custom paths to http-parser and libuv if you dont want to use the submodules.

Tested on Ubuntu 11.10 and GCC 4.6.1. and OSX 10.8.2

Other Resources

主要指標

概覽
名稱與所有者d5/node.native
主編程語言C++
編程語言C++ (語言數: 4)
平台
許可證MIT License
所有者活动
創建於2012-02-03 07:29:57
推送於2016-06-10 22:27:47
最后一次提交2016-06-10 15:27:47
發布數0
用户参与
星數1.2k
關注者數86
派生數147
提交數112
已啟用問題?
問題數28
打開的問題數17
拉請求數11
打開的拉請求數0
關閉的拉請求數4
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?