Skip to content

Instantly share code, notes, and snippets.

@cosbor11
Created March 1, 2017 03:28
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 cosbor11/a80182707fa563d046a4afeca853e1f3 to your computer and use it in GitHub Desktop.
Save cosbor11/a80182707fa563d046a4afeca853e1f3 to your computer and use it in GitHub Desktop.
Onyx Web Service Database main application
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