springload / springtunes

Control your Spotify client remotely from your browser
19 stars 0 forks source link

Separate API / pages / static file concerns for the server #13

Closed thibaudcolas closed 8 years ago

thibaudcolas commented 8 years ago

Right now https://github.com/springload/springtunes/blob/master/src/server.js contains:

Those should ideally be kept separated (maybe have a look at the app.use middleware / sub-app concept from Express: http://expressjs.com/en/api.html#app.use). Having them separated makes it easier to work on any of those (by not having to read through unrelated code for example).

vincentaudebert commented 8 years ago

I moved the API endpoints outside of the server file to a routes.js file. I think it makes it easy/small enough to read for now.