Ready for deployment?

This commit is contained in:
Joachim 2018-09-13 22:15:48 +02:00
parent 738977800d
commit a6751e92d1
2 changed files with 24 additions and 1 deletions

22
pom.xml
View File

@ -100,6 +100,28 @@
<jvmTarget>1.8</jvmTarget> <jvmTarget>1.8</jvmTarget>
</configuration> </configuration>
</plugin> </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals> <goal>single</goal> </goals>
<configuration>
<archive>
<manifest>
<mainClass>ServerKt</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</execution>
</executions>
</plugin>
</plugins> </plugins>
</build> </build>

View File

@ -22,7 +22,8 @@ fun main(args: Array<String>) {
// set up cors // set up cors
router.route().handler( router.route().handler(
CorsHandler.create("http://localhost:4200") // CorsHandler.create("http://localhost:4200")
CorsHandler.create("*")
.allowCredentials(true) .allowCredentials(true)
.allowedHeader("Access-Control-Allow-Method") .allowedHeader("Access-Control-Allow-Method")
.allowedHeader("Access-Control-Allow-Origin") .allowedHeader("Access-Control-Allow-Origin")