Node.js like API in C