HacklightMoon / moonlighter

:new_moon_with_face: :computer: :moneybag:
4 stars 2 forks source link

Routerbranch #313

Closed enterloper closed 8 years ago

enterloper commented 8 years ago

I made individual routes for each grouping of endpoints when it seemed to make sense. This modularized the code, making it easier to find particular elements and/or behavior. In addition, I removed the multiple calls via express.static for static files throughout the server, this increases rendering speed noticeably. I also removed staticRoot variable as it's no longer needed. Also changed the setting of the port, to a get/set relationship as it's best practice and relies on process.env.PORT (in production) directly rather than the config object.