From 486e718eeede1ac31deb1ddab53ab95097d3ef10 Mon Sep 17 00:00:00 2001 From: Jonathan Bernard Date: Thu, 24 Sep 2015 08:36:34 -0500 Subject: [PATCH] Tabs -> spaces. --- .../net/GroovyDirectoryServer.groovy | 54 +++++++++---------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/src/main/groovy/com/jdbernard/net/GroovyDirectoryServer.groovy b/src/main/groovy/com/jdbernard/net/GroovyDirectoryServer.groovy index 965eafb..e418863 100755 --- a/src/main/groovy/com/jdbernard/net/GroovyDirectoryServer.groovy +++ b/src/main/groovy/com/jdbernard/net/GroovyDirectoryServer.groovy @@ -6,38 +6,38 @@ import groovy.servlet.* public class GroovyDirectoryServer { - public static final String VERSION = "1.0" + public static final String VERSION = "1.0" - public static void main(String[] args) { - def port = 9002 - - if (args.length < 1) { println "Defaulting to port 9002" } + public static void main(String[] args) { + def port = 9002 + + if (args.length < 1) { println "Defaulting to port 9002" } - else try { port = args[0] as int } - catch(Exception e) { - println "Usage: GroovyDirectoryServer.grooy " - System.exit(1) } + else try { port = args[0] as int } + catch(Exception e) { + println "Usage: GroovyDirectoryServer.grooy " + System.exit(1) } - println "Starting Jetty on port $port, press Ctrl-C to stop." - runJetty(port) - } + println "Starting Jetty on port $port, press Ctrl-C to stop." + runJetty(port) + } - public static void runJetty(int port) { - def server = new Server(port) - - def handler = new ServletContextHandler(ServletContextHandler.SESSIONS) - handler.contextPath = '/' - handler.resourceBase = '.' + public static void runJetty(int port) { + def server = new Server(port) + + def handler = new ServletContextHandler(ServletContextHandler.SESSIONS) + handler.contextPath = '/' + handler.resourceBase = '.' - // Groovy Scripts - handler.addServlet(GroovyServlet, '*.groovy') + // Groovy Scripts + handler.addServlet(GroovyServlet, '*.groovy') - // Files - def filesHolder = handler.addServlet(DefaultServlet, '/') - filesHolder.setInitParameter('resourceBase', '.') - - server.handler = handler - server.start() - } + // Files + def filesHolder = handler.addServlet(DefaultServlet, '/') + filesHolder.setInitParameter('resourceBase', '.') + + server.handler = handler + server.start() + } }