This documentation discusses the best practices and the API for the C API layer for node.
In test.c
test.c
And then in index.js
index.js