Ignore the playground

This commit is contained in:
Braydon 2023-12-12 01:21:38 -05:00
parent bc4cea20ff
commit 04dd42d197
2 changed files with 2 additions and 27 deletions

3
.gitignore vendored

@ -25,4 +25,5 @@ crashlytics.properties
crashlytics-build.properties
fabric.properties
git.properties
pom.xml.versionsBackup
pom.xml.versionsBackup
Playground.java

@ -1,26 +0,0 @@
package me.braydon.feather;
import com.mongodb.ConnectionString;
import me.braydon.feather.databases.mongodb.MongoDB;
/**
* @author Braydon
*/
public final class Playground {
public static void main(String[] args) {
MongoDB mongoDB = new MongoDB(); // Create the database instance
mongoDB.connect(new ConnectionString("mongodb://root:p4$$w0rd@localhost:27017/database")); // Connect to the MongoDB server
// Get the ping to the database synchronously (blocking)
long ping = mongoDB.sync().getPing();
System.out.println("ping = " + ping);
// ...or get the ping to the database asynchronously (another thread)
mongoDB.async().getPing().thenAccept(asyncPing -> {
System.out.println("asyncPing = " + asyncPing);
});
// Close the connection after our app is done
mongoDB.close();
}
}