GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - d5/node.native: C++11 port for the Node: native performance and modern simplicity.

BranchesTags
Open more actions menu

Latest commit

 

History

112 Commits
112 Commits

Folders and files

NameName
Last commit message
Last commit date
doc
doc
 
 
http-parser @ fa74550
http-parser @ fa74550
 
 
libuv @ 017e2d5
libuv @ 017e2d5
 
 
native
native
 
 
.gitignore
.gitignore
 
 
.gitmodules
.gitmodules
 
 
LICENSE
LICENSE
 
 
Makefile
Makefile
 
 
README.md
README.md
 
 
file_test.cpp
file_test.cpp
 
 
node.native.gyp
node.native.gyp
 
 
webclient.cpp
webclient.cpp
 
 
webserver.cpp
webserver.cpp
 
 

Repository files navigation

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

  • Mailing list
  • Public to-to lists

About

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

Resources

Readme
MIT license
Activity

Stars

1.2k stars

Watchers

84 watching

Forks

146 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.