Hi Sykes,
Yes that is possible. Iirc, mongo even has a direct rest interface you can hook up to the web. However, this is a very high risk. I would never hook up any DB directly to the web. Put in a server in between so you have control over the access to the DB.
Have a look at the mean stack, you can solve it in a similar way.
Regards
Sander