Thank you kindly. This at least helps get me started. Yeah, I know it's kind of asking for an opinionated answer, but it helps me when I review existing code instead of googling for random snippets across the internet.
I'll start with the actual node codebase and move from there. On Monday, 15 December 2014 12:51:28 UTC-5, Floby wrote: > > Hello, > > my advice on the matter of "good coding style" and "best practices" are > that these are similar to bandwagons. The smarter thing to do would be to > try and gain some understanding of the existing practices and where they > come from. > > that said : > - the node.js codebase itself has a pretty straighforward coding style > - express has had a lot of contributors and does some pretty clever stuff > - I don't like request's coding style and particularily not how it's just > one big file > - any of substack's module is a good place to start as they are usually > small and easy to wrap your head around > - nodejitsu/flatiron codebases are pretty well done in my opinion, very > organised > - strongloop code should be ok to look at as well > > > > On Saturday, 13 December 2014 00:03:02 UTC+1, Justin Maat wrote: >> >> Apologies since I know this is sort of a broad question, but I'm fairly >> new with Node and trying to wrap my helload around some best practices. I >> come from a java/scala background and while learning a new language, I >> typically like to look at existing libraries to get some knowledge and >> understanding. >> >> My goal - I'm trying to make a npm module that will aggregate a bunch of >> different (but functionally related) rest api's then expose them with some >> common wrapper functions. >> >> For example - http://domain1/some_endpoint/.. , >> http://domain2/some_other_endpoint,.. etc. Where the endpoints >> (some_endpoint and other_endpoint) do functionally similar things >> >> Where my module will allow something like >> >> var myapp = require('myapp.js'); >> var Domain1 = myapp.domain1; >> var Domain2 = myapp.domain2; >> >> >> Domain1.endpoint(args); //or something to this effect >> Domain2.endpoint(args); >> >> >> My question is, what are some open source resources that are considered >> "good" that I can review for best practices on how to structure the app? >> So far, I've looked through the request, async, and q libraries to try and >> find some inspiration but there seems to be a huge difference in coding >> styles between alot of these open source projects. >> >> >> So.. I guess my question can be generalized as - what are some good open >> source projects that are considered "good" code that can be used for >> reference? >> > -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/9c94bbe3-2821-4f02-bb72-8a384a3acbd0%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
