@@ -0,0 +1,1302 @@
+package com.google.slurp.servlets;%0A%0Aimport java.io.IOException;%0Aimport javax.servlet.ServletContextEvent;%0Aimport javax.servlet.ServletContextListener;%0Aimport javax.servlet.annotation.WebListener;%0A%0Aimport com.google.auth.oauth2.GoogleCredentials;%0Aimport com.google.firebase.FirebaseApp;%0Aimport com.google.firebase.FirebaseOptions;%0A%0A/**%0A * Servlet context listener that is looked for whenever the backend server%0A * receives a startup or shutdown request.%0A */%0A@WebListener%0Apublic class ServerListener implements ServletContextListener %7B%0A%0A  /**%0A   * %7B@inheritDoc%7D%0A   *%0A   * Initialize the Firebase Admin app for the server.%0A   */%0A  @Override%0A  public void contextInitialized(ServletContextEvent event) %7B%0A    System.out.println(%22Server initialized and starting up...%22);%0A%0A    try %7B%0A      FirebaseOptions options = new FirebaseOptions.Builder()%0A          .setCredentials(GoogleCredentials.getApplicationDefault())%0A          .build();%0A%0A      FirebaseApp.initializeApp(options);%0A    %7D catch (IOException error) %7B%0A      System.err.println(%22Error obtaining the Application Default Credentials:%22);%0A      error.printStackTrace();%0A    %7D%0A  %7D%0A%0A  /**%0A   * %7B@inheritDoc%7D%0A   */%0A  @Override%0A  public void contextDestroyed(ServletContextEvent event) %7B%0A    System.out.println(%22Server destroyed and shutting down...%22);%0A  %7D%0A%7D%0A

Add WebListener for the backend server