Skip to content
Snippets Groups Projects
Commit 3fb9eb05 authored by Alfredo Chissotti's avatar Alfredo Chissotti
Browse files

non so perche', non funziona l'import di conf.json

parent 1916612f
No related branches found
No related tags found
No related merge requests found
No preview for this file type
......@@ -24,8 +24,6 @@ public class Resources implements HttpHandler {
String requestMethod = exchange.getRequestMethod();
if (Helper.compareText(requestMethod, "GET")) {
String response = getLocalPage(requestURI);
if(requestURI.contains("conf"))
System.out.println("URI: " + requestURI+"\tresponse: "+response);
if(response.equals("fail")){
//nel caso in cui non ci sia il file (perche non stato scaricato), allora creo un file fittizzio per non far crashare tutto il resto
String[] requestedPath = requestURI.split("/");
......@@ -40,7 +38,10 @@ public class Resources implements HttpHandler {
switch (requestURI.substring(1, 4)) {
case "js/" : strlist.add("text/javascript"); break;
case "css" : strlist.add("text/css"); break;
default : strlist.add("text"); break;
// case "con" : strlist.add("text/plain"); break;
case "con" : strlist.add("application/json"); break;
// default : strlist.add("text/plain"); break;
default: strlist.add("text"); break;
}
exchange.getResponseHeaders().put("content-type", strlist);
exchange.sendResponseHeaders(200, response.getBytes().length);
......
{
"self-server-url": "https://localhost:3000/",
"keycloak": {
"realm": "test00",
"base-server-url": "http://localhost:8080/"
},
"domain": {
"base-server-url": "http://localhost:3001/"
}
}
\ No newline at end of file
"use strict";
import conf from '../../conf/conf.json';
// import conf from '../../conf/conf.json' assert {type: 'json'};
const conf = {
"self-server-url": "https://localhost:3000/",
"keycloak": {
"realm": "test00",
"base-server-url": "http://localhost:8080/"
},
"domain": {
"base-server-url": "http://localhost:3001/"
}
};
class Configuration {
static getMyURL() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment