Adding moongoosejs and writing device layer.