restructure beer outside server.js