You can move makeEndpoint, personaSSO, and loginAPI to app.locals, because they won't change during the runtime of the server. See https://github.com/mozilla/popcorn.webmaker.org/blob/master/server.js#L60-L66