Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .run/StructuresServerApplication.run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<configuration default="false" name="StructuresServerApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot" nameIsGenerated="true">
<option name="ACTIVE_PROFILES" value="development" />
<option name="ENABLE_JMX_AGENT" value="false" />
<module name="kinotic.structures-server.main" />
<module name="structures.structures-server.main" />
<option name="SPRING_BOOT_MAIN_CLASS" value="org.kinotic.structuresserver.StructuresServerApplication" />
<option name="VM_PARAMETERS" value="-XX:MaxDirectMemorySize=1g -Xmx4096m -XX:+AlwaysPreTouch -XX:+UseG1GC -XX:+ScavengeBeforeFullGC -XX:+DisableExplicitGC --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED --add-opens=java.base/jdk.internal.misc=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED --add-opens=java.base/sun.reflect.generics.reflectiveObjects=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED" />
<extension name="net.ashald.envfile">
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
rootProject.name = 'kinotic'
rootProject.name = 'structures'

rootDir.listFiles().each {
if (it.directory && new File(it, 'settings.gradle').exists()) {
Expand Down
2 changes: 1 addition & 1 deletion structures-frontend/.run/Structures Next UI.run.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Structures Next UI" type="js.build_tools.npm">
<package-json value="$PROJECT_DIR$/package.json" />
<package-json value="$PROJECT_DIR$/structures-frontend/package.json" />
<command value="run" />
<scripts>
<script value="dev" />
Expand Down
11 changes: 10 additions & 1 deletion structures-frontend/src/util/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,16 @@ class ConfigService {
let staticSitePort = import.meta.env.VITE_STATIC_SITE_PORT ? parseInt(import.meta.env.VITE_STATIC_SITE_PORT) : -1
const connectionInfo: ConnectionInfo = createConnectionInfo();
if(staticSitePort === -1 && connectionInfo.port){
staticSitePort = connectionInfo.port;
if ((window.location.hostname === '127.0.0.1'
|| window.location.hostname === 'localhost')
&& window.location.port) {

// we use the current port for local testing/dev usage
staticSitePort = parseInt(window.location.port);

}else{
staticSitePort = connectionInfo.port;
}
}
const resp = await fetch(`${connectionInfo.useSSL ? 'https' : 'http'}://${connectionInfo.host}${staticSitePort === -1 ? '' : ':' + staticSitePort}/${this.config?.frontendConfigurationPath || 'app-config.override.json'}`);
if (resp.ok) {
Expand Down
Loading