Last active
January 23, 2017 19:19
-
-
Save shahzadns/fe736b02d5149b832737a055422b2f0e to your computer and use it in GitHub Desktop.
Revisions
-
shahzadns revised this gist
Jan 19, 2017 . No changes.There are no files selected for viewing
-
shahzadns revised this gist
Jan 19, 2017 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -32,10 +32,12 @@ This gist proposes an enhanced CommonJS module declaration pattern for nodeJS/ex /*routes list*/ //... //(all module exports(first indirect ones (from another module), then direct ones) should be listed here.) /*exports*/ //... //(all handlers (routes, utils) should be listed here.) /*functions declarations*/ //... -
shahzadns revised this gist
Jan 19, 2017 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,12 +8,12 @@ Description: This gist proposes an enhanced CommonJS module declaration pattern for nodeJS/express modules. */ //(all core imports,requires should be listed here. e.g "fs", etc) /*core modules*/ //... //(all external imports,requires should be listed here. e.g "express", etc) /*external modules*/ //... @@ -28,7 +28,7 @@ This gist proposes an enhanced CommonJS module declaration pattern for nodeJS/ex //... //(all routes, or anything similar should be listed together, along with ref to their handlers here) /*routes list*/ //... -
shahzadns revised this gist
Jan 19, 2017 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -18,7 +18,7 @@ This gist proposes an enhanced CommonJS module declaration pattern for nodeJS/ex //... //(all module-scoped local vars, lets, should be listed here.) /*locals*/ //... @@ -36,7 +36,7 @@ This gist proposes an enhanced CommonJS module declaration pattern for nodeJS/ex /*exports*/ //... //(all handlers (routes, utils) should be listed here.) /*functions declarations*/ //... -
shahzadns revised this gist
Jan 19, 2017 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -39,3 +39,4 @@ This gist proposes an enhanced CommonJS module declaration pattern for nodeJS/ex //(all handlers (routes, utils) should be list here.) /*functions declarations*/ //... -
shahzadns revised this gist
Jan 19, 2017 . No changes.There are no files selected for viewing
-
shahzadns created this gist
Jan 19, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,41 @@ /* Date: Jan 19 2017 title: NodeJS enhanced CJS module pattern author: Shahzad Nawaz email: [email protected] Description: This gist proposes an enhanced CommonJS module declaration pattern for nodeJS/express modules. */ //(all core imports,requires should be list here. e.g "fs", etc) /*core modules*/ //... //(all external imports,requires should be list here. e.g "express", etc) /*external modules*/ //... //(all module-scoped local vars, lets, should be list here.) /*locals*/ //... //(any initialization(s) should be written here.) /*initialization*/ //... //(all routes, or anything similar should be list together, along with ref to their handlers here) /*routes list*/ //... //(all module exports(first indirect ones (from another module), then direct ones) should be listed here.) /*exports*/ //... //(all handlers (routes, utils) should be list here.) /*functions declarations*/ //...