import edu.vt.cs.collab.cork.impl.inet.ServerImpl;

/*
 * Simple CORK server, with little error handling. Should be
 * executed with port number as an argument.
 */
public class Server {

    public Server(int port) {
        try {
            ServerImpl server = new ServerImpl(
                port,   // port the server listens on
                "DATA", // directory the server stores object data in
                2,      // Depth of storage directories
                true,   // support http connections
                10 * 60);  // purge idle objects every 10 minutes
        }
        catch(Exception e) {
            System.err.println("Server startup failed: ");
            e.printStackTrace();
        }
    }

    public static void main(String[] args) {
        int port = Integer.parseInt(args[0]);
        Server s = new Server(port);
    }

}