Skip to content

Instantly share code, notes, and snippets.

@RyanSusana
Created March 12, 2019 20:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RyanSusana/fc9ab43e2f55af6a95c55fa0f27b3b57 to your computer and use it in GitHub Desktop.
Save RyanSusana/fc9ab43e2f55af6a95c55fa0f27b3b57 to your computer and use it in GitHub Desktop.
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