import ServiceLookup from '../../../shared/lib/service-lookup';

var Plugin = {};
Plugin.register = function(server, options, next) {
  server.ext('onPreResponse', function (request, reply) {
    if(ServiceLookup.getService() == 'true'){
      return reply.view('service-down');
    } else {
      reply.continue();
    }
  });
  next();
};

Plugin.register.attributes = {
  name: 'serviceUpDown',
  version: '0.1'
};

module.exports = Plugin;
@@ -192,16 +192,17 @@
 %0A    if(
+(
 ServiceL
@@ -230,16 +230,63 @@
  'true')
+ && !(request.url.path.startsWith('/assets/')))
 %7B%0A      

check if request is static