Skip to content

Module template #1

Closed
Closed

Description

@networkimprov

I really appreciate this tutorial, excellent work, and so necessary.

It'd be helpful to have a folder with a complete module template including:

  • a module constant (e.g. module.CONST)
  • object constructor defining member variable with default value
  • sync object method returning an array of sample values: [ 123, 'string', true, null, { m:1 }, new Buffer('stuff') ]
  • async object method with a baton & baton subtype, and TryCatch for callback invocation
  • uv_async use from the thread pool routine (maybe this is a separate tutorial folder)

And provide limited comments to document where the user should add further definitions and logic.

If you like the idea, I'd be glad to submit patches...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions