src/main/java/com/webcheckers/ui/WebServer.java
public void initialize() {

    // Configuration to serve static files
    staticFileLocation("/public");

    //// Setting any route (or filter) in Spark triggers initialization of the
    //// embedded Jetty web server.

    //// A route is set for a request verb by specifying the path for the
    //// request, and the function callback (request, response) -> {} to
    //// process the request. The order that the routes are defined is
    //// important. The first route (request-path combination) that matches
    //// is the one which is invoked. Additional documentation is at
    //// http://sparkjava.com/documentation.html and in Spark tutorials.

    //// Each route (processing function) will check if the request is valid
    //// from the client that made the request. If it is valid, the route
    //// will extract the relevant data from the request and pass it to the
    //// application object delegated with executing the request. When the
    //// delegate completes execution of the request, the route will create
    //// the parameter map that the response template needs. The data will
    //// either be in the value the delegate returns to the route after
    //// executing the request, or the route will query other application
    //// objects for the data needed.

    //// FreeMarker defines the HTML response using templates. Additional
    //// documentation is at
    //// http://freemarker.org/docs/dgui_quickstart_template.html.
    //// The Spark FreeMarkerEngine lets you pass variable values to the
    //// template via a map. Additional information is in online
    //// tutorials such as
    //// http://benjamindparrish.azurewebsites.net/adding-freemarker-to-java-spark/.

    //// These route definitions are examples. You will define the routes
    //// that are appropriate for the HTTP client interface that you define.
    //// Create separate Route classes to handle each route; this keeps your
    //// code clean; using small classes.

    // Shows the Checkers game Home page.
    get(HOME_URL, new GetHomeRoute(templateEngine, playerLobby));

    // Shows the sign in page
    get(SIGNIN_URL, new GetSigninRoute(templateEngine));

    // Gets the username
    post(POSTSIGNIN_URL, new PostSigninRoute(templateEngine, playerLobby, sessions));

    // Signs out the user
    post(POSTSIGNOUT_URL, new PostSignoutRoute(templateEngine, playerLobby, sessions));

    // Initiates a game
    post(POSTGAME_URL, new PostGameRoute(templateEngine, playerLobby, sessions));

    //Shows Game page
    get(GAME_URL, new GetGameRoute(templateEngine, playerLobby));

    // Resign route
    post(POSTRESIGN_URL, new PostResignRoute(templateEngine));

    post(POSTVALIDATEMOVE_URL, new PostValidateMoveRoute(templateEngine, playerLobby, gson));
    //
    LOG.config("WebServer is initialized.");
  }
/**
   * Initialize all of the HTTP routes that make up this web application.
   *
   * <p>
   * Initialization of the web server includes defining the location for static
   * files, and defining all routes for processing client requests. The method
   * returns after the web server finishes its initialization.
   * </p>
   */
Initialize all of the HTTP routes that make up this web application.


Initialization of the web server includes defining the location for static
files, and defining all routes for processing client requests. The method
returns after the web server finishes its initialization.
Initialize all of the HTTP routes that make up this web application . Initialization of the web server includes defining the location for static files and defining all routes for processing client requests . The method returns after the web server finishes its initialization .
public void initialize() {
    staticFileLocation("/public");
    get(HOME_URL, new GetHomeRoute(templateEngine, playerLobby));
    get(SIGNIN_URL, new GetSigninRoute(templateEngine));
    post(POSTSIGNIN_URL, new PostSigninRoute(templateEngine, playerLobby, sessions));
    post(POSTSIGNOUT_URL, new PostSignoutRoute(templateEngine, playerLobby, sessions));
    post(POSTGAME_URL, new PostGameRoute(templateEngine, playerLobby, sessions));
    get(GAME_URL, new GetGameRoute(templateEngine, playerLobby));
    post(POSTRESIGN_URL, new PostResignRoute(templateEngine));
    post(POSTVALIDATEMOVE_URL, new PostValidateMoveRoute(templateEngine, playerLobby, gson));
    LOG.config("WebServer is initialized.");
  }
public void initialize ( ) { staticFileLocation ( "/public" ) ; get ( HOME_URL , new GetHomeRoute ( templateEngine , playerLobby ) ) ; get ( SIGNIN_URL , new GetSigninRoute ( templateEngine ) ) ; post ( POSTSIGNIN_URL , new PostSigninRoute ( templateEngine , playerLobby , sessions ) ) ; post ( POSTSIGNOUT_URL , new PostSignoutRoute ( templateEngine , playerLobby , sessions ) ) ; post ( POSTGAME_URL , new PostGameRoute ( templateEngine , playerLobby , sessions ) ) ; get ( GAME_URL , new GetGameRoute ( templateEngine , playerLobby ) ) ; post ( POSTRESIGN_URL , new PostResignRoute ( templateEngine ) ) ; post ( POSTVALIDATEMOVE_URL , new PostValidateMoveRoute ( templateEngine , playerLobby , gson ) ) ; LOG . config ( "WebServer is initialized." ) ; }
Initialize all of the HTTP routes that make up this web application.
Initialize all of the HTTP routes that make up this web application .
// Configuration to serve static files
 //// Setting any route (or filter) in Spark triggers initialization of the
 //// embedded Jetty web server.
 //// A route is set for a request verb by specifying the path for the
 //// request, and the function callback (request, response) -> {} to
 //// process the request. The order that the routes are defined is
 //// important. The first route (request-path combination) that matches
 //// is the one which is invoked. Additional documentation is at
 //// http://sparkjava.com/documentation.html and in Spark tutorials.
 //// Each route (processing function) will check if the request is valid
 //// from the client that made the request. If it is valid, the route
 //// will extract the relevant data from the request and pass it to the
 //// application object delegated with executing the request. When the
 //// delegate completes execution of the request, the route will create
 //// the parameter map that the response template needs. The data will
 //// either be in the value the delegate returns to the route after
 //// executing the request, or the route will query other application
 //// objects for the data needed.
 //// FreeMarker defines the HTML response using templates. Additional
 //// documentation is at
 //// http://freemarker.org/docs/dgui_quickstart_template.html.
 //// The Spark FreeMarkerEngine lets you pass variable values to the
 //// template via a map. Additional information is in online
 //// tutorials such as
 //// http://benjamindparrish.azurewebsites.net/adding-freemarker-to-java-spark/.
 //// These route definitions are examples. You will define the routes
 //// that are appropriate for the HTTP client interface that you define.
 //// Create separate Route classes to handle each route; this keeps your
 //// code clean; using small classes.
 // Shows the Checkers game Home page.
 // Shows the sign in page
 // Gets the username
 // Signs out the user
 // Initiates a game
 //Shows Game page
 // Resign route
 //
