andyjac / top_10_albums

Displays top 10 albums for a highlighted musical artist in the browser
0 stars 0 forks source link

Use multiple source files #5

Closed bion closed 10 years ago

bion commented 10 years ago

app.js is getting big and doesn't know what it's responsible for anymore. Put the functions below line 23 (except for app.listen(300)) in different files, organized by concern and require them. When you're done, you should have something like this in app.js:

var indexHandler = require('./index_handler')
var searchHandler = require('./search_handler')
...
app.get('/', getIndexHandler);
app.post('/search', searchHandler);
bion commented 10 years ago

Also, this isn't a high priority right now.

andyjac commented 10 years ago

Word. I'll add this to the todo list.

bion commented 10 years ago

done!

andyjac commented 10 years ago

:)

andyjac commented 10 years ago

Close.