Skip to content

Project demonstrating the basic concepts of Kotlin KTor

Notifications You must be signed in to change notification settings

nikhilbansal97/Ktor-Hello-Server

Repository files navigation

Ktor Hello Server

Simple project to showcase how to use some basic features and define routes. It is hooked to a MongoDb Database to save the users information.

Features uses

  1. Call Logging
  2. Content Negotiation
  3. Status Pages
  4. Sessions

Upcoming

  1. JWT Authentication
  2. WebSockets

Routes

  1. POST /register

Request Payload:

{
  "username": "john",
  "password": "password",
  "firstName": "John",
  "lastName": "Doe"
}

Response:

{
  "message": "Registration successful for user john!"
}
  1. POST /login

Request Payload:

{
  "username": "john",
  "password": "password"
}

Response:

{
  "message": "Login Success!"
}
  1. GET /users

Response:

[
  {
      "id": "5e731f41b7523f2b44eec847",
      "username": "john",
      "firstName": "John",
      "lastName": "Doe"
  }
]

About

Project demonstrating the basic concepts of Kotlin KTor

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages