How to connect to a database with javaScript