Created
March 1, 2017 03:28
-
-
Save cosbor11/a80182707fa563d046a4afeca853e1f3 to your computer and use it in GitHub Desktop.
Onyx Web Service Database main application
This file contains hidden or 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
public static void main(String[] args) throws Exception | |
{ | |
WebDatabaseServer server1 = new WebDatabaseServer(); | |
server1.setWebServicePort(8080); | |
server1.setPort(8081); | |
String pathToOnyxDB = System.getProperty("user.home") | |
+ File.separatorChar + ".onyxdb" | |
+ File.separatorChar + "sandbox" | |
+ File.separatorChar +"remote-db.oxd"; | |
server1.setCredentials("onyx-remote", "SavingDataIsFun!"); | |
server1.setDatabaseLocation(pathToOnyxDB); | |
server1.start(); | |
System.out.println("Server Started"); | |
server1.join(); //joins the database thread with the application thread | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment