Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove configure app from Saturn. #95

Merged
merged 1 commit into from
May 24, 2018
Merged
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
11 changes: 4 additions & 7 deletions Content/src/Server/ServerSaturn.fs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ let webApp =
remoting server {
use_route_builder Route.builder
}

#else
let webApp = scope {
get "/api/init" (fun next ctx ->
Expand All @@ -43,29 +44,25 @@ let webApp = scope {
return! Successful.OK counter next ctx
})
}
#endif

#endif
#if (!remoting)
let configureSerialization (services:IServiceCollection) =
let fableJsonSettings = Newtonsoft.Json.JsonSerializerSettings()
fableJsonSettings.Converters.Add(Fable.JsonConverter())
services.AddSingleton<IJsonSerializer>(NewtonsoftJsonSerializer fableJsonSettings)
#endif

#endif
#if (deploy == "azure")
let configureAzure (services:IServiceCollection) =
tryGetEnv "APPINSIGHTS_INSTRUMENTATIONKEY"
|> Option.map services.AddApplicationInsightsTelemetry
|> Option.defaultValue services
#endif

let configureApp (app:IApplicationBuilder) =
app.UseDefaultFiles()

#endif
let app = application {
url ("http://0.0.0.0:" + port.ToString() + "/")
router webApp
app_config configureApp
memory_cache
use_static publicPath
#if (!remoting)
Expand Down