Update wine.js methods to use mongodb