diff options
Diffstat (limited to 'language-web/src/main/java/org/eclipse/viatra/solver/language/web/ServerLauncher.java')
-rw-r--r-- | language-web/src/main/java/org/eclipse/viatra/solver/language/web/ServerLauncher.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/language-web/src/main/java/org/eclipse/viatra/solver/language/web/ServerLauncher.java b/language-web/src/main/java/org/eclipse/viatra/solver/language/web/ServerLauncher.java index 2c0413df..a9017264 100644 --- a/language-web/src/main/java/org/eclipse/viatra/solver/language/web/ServerLauncher.java +++ b/language-web/src/main/java/org/eclipse/viatra/solver/language/web/ServerLauncher.java | |||
@@ -3,6 +3,7 @@ | |||
3 | */ | 3 | */ |
4 | package org.eclipse.viatra.solver.language.web; | 4 | package org.eclipse.viatra.solver.language.web; |
5 | 5 | ||
6 | import java.io.File; | ||
6 | import java.io.IOException; | 7 | import java.io.IOException; |
7 | import java.net.InetSocketAddress; | 8 | import java.net.InetSocketAddress; |
8 | import java.net.URI; | 9 | import java.net.URI; |
@@ -62,7 +63,8 @@ public class ServerLauncher { | |||
62 | } | 63 | } |
63 | var indexUrlInJar = ServerLauncher.class.getResource("/webapp/index.html"); | 64 | var indexUrlInJar = ServerLauncher.class.getResource("/webapp/index.html"); |
64 | if (indexUrlInJar == null) { | 65 | if (indexUrlInJar == null) { |
65 | throw new IOException("Cannot find pacakged web assets"); | 66 | var workingPath = new String[] { System.getProperty("user.dir"), "build", "webpack", "development", }; |
67 | return Resource.newResource(new File(String.join(File.separator, workingPath))); | ||
66 | } | 68 | } |
67 | var webRootUri = URI.create(indexUrlInJar.toURI().toASCIIString().replaceFirst("/index.html$", "/")); | 69 | var webRootUri = URI.create(indexUrlInJar.toURI().toASCIIString().replaceFirst("/index.html$", "/")); |
68 | return Resource.newResource(webRootUri); | 70 | return Resource.newResource(webRootUri); |