19.6 C
London

JetBrains’ Ktor 3.1.0 Introduces CLI for Easier Project Setup

Published:

Kotlin-based web framework introduces a new command-line tool to create projects and enhances server-sent events with serialization, reconnection, and heartbeat features.

JetBrains’ Ktor 3.1.0, an update to the Kotlin-based framework for asynchronous server-side and client-side applications, is now available, featuring a command-line tool for simpler creation of projects. The update also brings new features to server-sent events (SSE), which allow a server to continuously push events to a client over HTTP.

The 3.1.0 version, described by JetBrains as a minor release, was unveiled February 13. Instructions on getting started with Ktor can be found at ktor.io.

The new Ktor CLI tool offers an easy-to-use interface to generate project templates with the user’s preferred features, reducing boilerplate and setup times, JetBrains said. Running the ktor new command opens an interactive mode that allows the user to choose plugins and configure a project using the same options available in the Ktor Project Generator at start.ktor.io.

Also in Kotlin 3.1.0, server-side events (SSE) support has been upgraded with built-in serialization for both client and server, enabling them to handle SSE streams with automatic serialization and deserialization. SSE support now includes the ability to specify a heartbeat event to keep a session active, and the ability to enable a reconnection feature by setting the maxReconnectionAttempts property to a value greater than zero. If the client’s connection to the server is lost, it will wait for a specified reconnectionTime, then make maxReconnectionAttempts to reestablish the connection.

Explore emtech 360 for the latest advancements in Information Technology & insightful updates from industry experts! 

Source : https://www.infoworld.com/article/3824315/jetbrains-ktor-adds-cli-for-simpler-project-creation.html

EM Tech
EM Techhttps://emtech360.co.uk
EM Tech is a tech enthusiast and developer who writes simple, practical guides on software, AI, and the latest tech trends — helping readers stay ahead in the digital world.

Related articles

Recent articles

spot_img