comparison src/luan/host/WebHandler.java @ 1392:002152af497a

hosted postgres
author Franklin Schmidt <fschmidt@gmail.com>
date Fri, 06 Sep 2019 00:19:47 -0600
parents 5c3702f60200
children 221eedb0f54e
comparison
equal deleted inserted replaced
1391:94f48cc76de8 1392:002152af497a
31 String logDir = dirStr + "/site/private/local/logs/web"; 31 String logDir = dirStr + "/site/private/local/logs/web";
32 new File(logDir).mkdirs(); 32 new File(logDir).mkdirs();
33 33
34 Luan luan = new Luan(); 34 Luan luan = new Luan();
35 Log4j.newLoggerRepository(luan); 35 Log4j.newLoggerRepository(luan);
36 initLuan(luan,dirStr,domain,true); 36 initLuan(luan,dirStr,domain);
37 return new LuanHandler(luan); 37 return new LuanHandler(luan);
38 } 38 }
39 }; 39 };
40 40
41 public static String securityPassword = "password"; // change for security 41 public static String securityPassword = "password"; // change for security
77 throw new RuntimeException("couldn't rename "+from+" to "+dir); 77 throw new RuntimeException("couldn't rename "+from+" to "+dir);
78 logger.info("recovered "+name+" from "+from); 78 logger.info("recovered "+name+" from "+from);
79 return true; 79 return true;
80 } 80 }
81 */ 81 */
82 private static void initLuan(Luan luan,String dir,String domain,boolean logging) { 82 private static void initLuan(Luan luan,String dir,String domain) {
83 security(luan,dir); 83 security(luan,dir);
84 try { 84 try {
85 LuanFunction fn = BasicLuan.load_file(luan,"classpath:luan/host/init.luan"); 85 LuanFunction fn = BasicLuan.load_file(luan,"classpath:luan/host/init.luan");
86 fn.call(dir,domain,logging); 86 fn.call(dir,domain);
87 } catch(LuanException e) { 87 } catch(LuanException e) {
88 throw new LuanRuntimeException(e); 88 throw new LuanRuntimeException(e);
89 } 89 }
90 } 90 }
91 91