attempting write to database instead of write to file so I can deploy to meteor