mkobit
04/26/2018, 6:21 PMNail Gilaziev
04/26/2018, 6:34 PMNail Gilaziev
04/27/2018, 7:04 AMhttps://ktor.io/pages/quickstart/intellij-idea/project-structure.png▾
Nail Gilaziev
04/27/2018, 2:05 PMcom.github.jengelman.gradle.plugins:shadow:
I found in docs two different lines to applying this plugin:
1) apply plugin: 'com.github.johnrengelman.plugin-shadow'
here https://ktor.io/servers/deploy.html#fat-jar-gradle
2) apply plugin: "com.github.johnrengelman.shadow"
here https://ktor.io/quickstart/docker.html#package-an-application-using-gradle
What the diferences between them?
with second line I succesfully create a fatJar - this is definitely true. )
with first line yesterday I had a problems - but it is not exactly. Message about it I write earlier
https://kotlinlang.slack.com/archives/C0A974TJ9/p1524754499000390Nail Gilaziev
04/27/2018, 4:15 PMtask stage(dependsOn: ['shadowJar'])
Newbie user can stuck with it a little bit)
more info here:
https://devcenter.heroku.com/articles/deploying-gradle-apps-on-heroku#verify-that-your-build-file-is-set-up-correctlyNail Gilaziev
04/27/2018, 4:21 PM./gradlew stage
heroku local web
And it works. App available on localhost:8080
After pushing to heroku via git push heroku master
it says that all is okay and write to console this: https://afternoon-sierra-23732.herokuapp.com/ deployed to Heroku
I tried to modify application.conf
and change port to 80 and 8080 vice versa. none of the options helped. And now I can't understand what are I'm doing wrong.ubu
04/28/2018, 12:00 PMCreai
04/29/2018, 5:37 PMRafa
04/29/2018, 9:57 PMSessions
feature with Authentication
?
authenticate {
location<Manual> {
authenticate("kchatAuth1") {
get {
call.respondText("Success")
}
}
}
}
I only get the ApplicationCall
object once I'm already inside of the get {...}
and at that point checking to see if there's an existing session is too latev
04/30/2018, 7:23 AMmethod=get
. I can't create the URL with locations.href
because I don't have the GET
parameters, they're filled in by the form.
Is there a better way of doing this, or is it just an edge case and I'm better leaving it as a hard-coded string?mp
05/01/2018, 4:26 PMkagomez
05/01/2018, 9:39 PMmp
05/04/2018, 5:17 PMJalerson Lima
05/09/2018, 7:53 AMdave08
05/10/2018, 12:26 PMrecieveFile
in response object...)?Marcin Wisniowski
05/10/2018, 11:25 PMjk2018
05/11/2018, 2:29 PMbrabo-hi
05/12/2018, 6:24 AMDeactivated User
05/14/2018, 8:42 AManli
05/15/2018, 10:23 AMval response = client.call("some/url") {
contentType(ContentType.Application.Json)
method = <http://HttpMethod.Post|HttpMethod.Post>
headers = HeadersBuilder ()
body = data
}
But compiler climes "Val can not be reassigned" against headers
. So. how are you settings custom client headers?mkobit
05/15/2018, 8:41 PMMarcin Wisniowski
05/16/2018, 6:18 PMjava.util.NoSuchElementException: No session data found for id
, no code in the stack trace is my code so I have no idea what I'm doing wrong.fred.deschenes
05/18/2018, 1:18 PMApplicationConfigValue
only has the getString
function and not the getInt
, getLong
, etc from hocon's Config
class?mp
05/18/2018, 1:23 PMvalidate
, but that only applies when a session is present, so it won't get hit on a request with no session or an invalid session cookie. What would be a better place to apply the header that can access call.authentication.principal()
or equivalent, yet will also get called on requests without sessions, etc?nyxcode
05/18/2018, 1:42 PMti4n
05/20/2018, 3:24 AMmp
05/21/2018, 8:41 PMMarcin Wisniowski
05/22/2018, 12:50 AMleus
05/22/2018, 8:28 PMchirag
05/23/2018, 7:29 AM@field:JsonProperty("foo")
and without field @JsonProperty("foo")
When should i use whenchirag
05/23/2018, 7:29 AM@field:JsonProperty("foo")
and without field @JsonProperty("foo")
When should i use whengildor
05/23/2018, 7:32 AMIf you don't specify a use-site target, the target is chosen according to the @Target annotation of the annotation being used. If there are multiple applicable targets, the first applicable target from the following list is used:
param;
property;
field.