codepath / codepath/nodejs_guides
Design Patterns
- Dominant language
- No language data
- Stars
- 74
- Forks
- 18
- PR merge metrics
- No merged PRs in 30d
Description
- require at top (core, package, file) then variables
- sync only during first tick => mark as `Sync`
- use promises => nodeify(), done(), `return`
- app as dependency injection
- middleware
- small modules
- export at top (single value) or bottom (multiple values)
- avoid parasitic (monkey patching the environment / runtime) code, except at app (top) level
- use js instead of JSON for configs (for comments)
- don't store state at the module level!!!! (export a constructor and store state in the instance)
- app lifecycle: require, configure, initialize, run (first tick contains: require, configure, start of initialize)
**What success looks like: Succinctness and clarity. Less is more.**
Reference Wikis: [Modules & Packages](https://github.com/codepath/nodejs_guides/wiki/Modules-&-Packages)
Open separate issues for required links to community sources if you're having trouble finding any.
_Please assign to yourself before working on this._
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.