Created
October 20, 2015 08:26
-
-
Save cosbor11/faa1d99a466b19ad554e to your computer and use it in GitHub Desktop.
onyx remote main method
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 | |
| { | |
| DatabaseServer server1 = new DatabaseServer(); | |
| server1.setPort(8080); | |
| 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