Is there any advantage using nodejs over ktor for ...
# ktor
h
Is there any advantage using nodejs over ktor for backend or every possible thing could be done using just ktor
ktor 1
a
They are basically HTTP libraries and can do the same thing. It all boils down to the third package libraries you want to use with them. Ktor has multiplatform support which is a huge advantage. It boils down to whether you want to use JS or Kotlin.
h
Thanks, as i have already started learning kotlin and writing android applications, i was curious to know to 'would kotlin be enough or should i take a parallel nodeJs path to build backend'. Thanks for the answer.
a
@Hassaan the Java ecosystem predates node by years. I don’t like Spring personally which is why I use Django/Python but the introduction of Ktor makes your knowledge transferable plus you get to share libraries( e.g. SqlDelight) which why I am diving in. One more thing… SqlDelight supports Kotlin/JS which means you can port your data layer to Node if you chose to do so in the future.
h
Oh, ok
r
We’ve migrated our frontend server from node to ktor for a few reasons: • Trouble with memory leaks • Node was often crashing (unhandled errors in koa, segfaults) • Getting node and typing / es modules working is.. particular The only part which still has to be done for feature parity is getting prerendering of the typescript frontend client working. AFAIK such things could be done either via Graal Polyglot or separating it out into a service that’ll be called by ktor