Open jkone27 opened 2 years ago
i solved by passing the lambda to services_config, instead of the function itself
let app = application {
//...
services_config (fun x -> configureServices x) // solved the issue !
}
i got the same compilation error using pipe_through within endpoints router CE
error FS0708: This control construct may only be used if the computation expression builder defines a 'For' method [/Users/admin/Repositories/travix.dotnettemplates/Travix.WebApi.Template.FSharp/content/src/Travix.WebApi.Template.WebService/Travix.WebApi.Template.WebService.fsproj]
let apiPipe = pipeline {
set_header "X-Test" "text"
}
i think the cause was using this in endpoints (as quoted in docs this doesnt work anymore)
not_found_handler (setStatusCode 404 >=> text "Api 404")
i am trying to extend a computation expression to add some custom behaviour, but then i get this error
and here are my extensions