node and js code snippets