Add api
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
package be.vandewalleh
|
||||
|
||||
import com.fasterxml.jackson.databind.SerializationFeature
|
||||
import io.ktor.application.Application
|
||||
import io.ktor.application.install
|
||||
import io.ktor.features.CORS
|
||||
import io.ktor.features.ContentNegotiation
|
||||
import io.ktor.jackson.jackson
|
||||
import io.ktor.locations.Locations
|
||||
|
||||
@Suppress("unused") // Referenced in application.conf
|
||||
fun Application.module() {
|
||||
install(Locations)
|
||||
|
||||
install(CORS) {
|
||||
anyHost()
|
||||
}
|
||||
|
||||
install(ContentNegotiation) {
|
||||
jackson {
|
||||
enable(SerializationFeature.INDENT_OUTPUT)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user