Starting: Connections

  • Connect
  • your database.

    🪶 After calling the instance you must
  • connect with your database:

    Call the .connect method where the parameter must be the name of your database.

    1
  • const
  • merlin =
  • new
  • MerlinDB(
  • )
  • ;
    2merlin
  • .connect(
  • "my-database-name"
  • )
  • .then(
  • e =>
  • {
  • console
  • .log(
  • e
  • )
  • }
  • )
  • ;  
    3
  • //{status: 200, message: 'Database connected'};
  • NOTE: As a final observation, I mention once again, if the database does not exist it creates one, and if it does exist it uses the existing one.