Commit 638b8c2c authored by tianyi's avatar tianyi
Browse files

removed printlns

parent ad51afcd
Pipeline #63501 canceled with stages
......@@ -21,7 +21,7 @@ public class MarkDownCreator implements Page {
public static File toMarkDown(String result, String query) throws IOException {
if (result == null || result.isEmpty()) {
result = "# Sorry\nSorry, we didn't understand" + query;
result = "# Sorry\nSorry, we didn't understand " + query;
}else{
result ="# "+ query + "\n" + result;
}
......
......@@ -13,7 +13,7 @@ import java.io.IOException;
public class WebServer {
public WebServer() throws Exception {
Server server = new Server(5000);//Integer.valueOf(System.getenv("PORT")));
Server server = new Server(Integer.valueOf(System.getenv("PORT")));
ServletHandler handler = new ServletHandler();
handler.addServletWithMapping(new ServletHolder(new Website()), "/*");
......@@ -39,10 +39,8 @@ public class WebServer {
if(type == null){
new HTMLResultPage(query, result).writeTo(resp);
}else if (type.equals("markdown")){
System.out.println("Is a markdown");
new MarkDownCreator(query, result).writeTo(resp);
}else{
System.out.println("Is a pdf");
try{
new PdfCreator(query, result).writeTo(resp);
}catch (InterruptedException e){
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment