app.js
/**
 * http_settings
 * 
 * Gracefully shuts down the reddit and http api's.
 * 
 * NOTE: If the http api has any open connections, the http server will 
 * wait until the connections are closed.
 */


Gracefully shuts down the reddit and http api's.

If the http api has any open connections, the http server will
wait until the connections are closed.
Gracefully shuts down the reddit and http api ' s . If the http api has any open connections the http server will wait until the connections are closed .
function http_quit(req) {
  C.log("/quit called.");
  reddit_api.quit();
  clearInterval(SUBSCRIPTION_TIMER);
  http_api.quit(() => {
    C.log("HTTP API server shut down.");
  });
  return {
    status: 'quitting'
  };
}
function http_quit ( req ) { C . log ( "/quit called." ) ; reddit_api . quit ( ) ; clearInterval ( SUBSCRIPTION_TIMER ) ; http_api . quit ( ( ) => { C . log ( "HTTP API server shut down." ) ; } ) ; return { status : 'quitting' } ; }
http_settings
http_settings