Created
March 12, 2019 20:02
-
-
Save RyanSusana/fc9ab43e2f55af6a95c55fa0f27b3b57 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.elepy.Elepy; | |
import com.elepy.admin.ElepyAdminPanel; | |
import com.mongodb.DB; | |
import com.mongodb.MongoClient; | |
public class Main { | |
public static void main(String[] args) { | |
MongoClient mongoClient = someMongoClientWithConfiguration; // Configure your MongoClient | |
DB exampleDB = mongoClient.getDB("example1"); | |
new Elepy() | |
.connectDB(exampleDB) | |
.onPort(7777) | |
.addModel(Product.class) | |
.addExtension(new ElepyAdminPanel()) | |
//Start Elepy! | |
.start(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment