sockinit / console.blog

1 stars 0 forks source link

Long files #32

Open hdrdavies opened 8 years ago

hdrdavies commented 8 years ago

Taking this file as an example... It's pretty long! I'd say the maximum file length you'd want in an ideal world is 100 lines. And even that is pushing it. The great thing about hapi is that you make modules / plugins and import them into your server in only a line. Makes server files much easier to read! Also consider taking out a lot of the logic into another file in a helpers folder, e.g. here. That kind of stuff doesn't have to be in the handler!

jay-meister commented 8 years ago

thanks huw i think our latest version isnt in master just yet

hdrdavies commented 8 years ago

Cool!

@JMurphyWeb You can make the commit that sorts it out appear here by referencing the issue number in the commit message i.e.

git commit -m "shortening blogDB.js #32"

don't be afraid of making smaller commits more often! Helps to show what you're doing to each file! :smile: