In this video, learn how to create Kotlin apps using the Community edition of IntelliJ IDEA.
- [Instructor] Let's begin building a Spark web app. Open up IntelliJ IDEA. Click Create New Project. In the New Project dialog box, on the menu on the left-hand side, select Maven. Check the Create from archetype button. Scroll down 'til you find the Kotlin JVM archetype. It is named org.jetbrains.cotlin:kotlin-archetype-jvm.
An archetype is a project template. This one creates a Kotlin app, which targets the Java Virtual Machine or JVM. Pay extra attention here. There is at least one other archetype with a very similar name. We want the Kotlin JVM archetype. Select it. Click next. For the Group ID, enter com.example.lambda1.
For the Artifact ID, enter lambda1. Change the version to 1.0. Click next, click next again, and click finish. IntelliJ will begin to build your project from the archetype. During this time, Maven will download packages. If the Maven project Need-to-be-Imported dialog box appears, click the link Enable Auto-Import.
From the project window, expand the project. Click source. Click main, Kotlin, down to hello.kt In the gutter, next to fun main, right click on the Kotlin K icon. The context menu will open. Click the first option, Run com.example.lambda1. The app will begin to build.
It should only take a few seconds to build and run the app. The run window will open near the bottom of the screen. It should display, "Hello, World." At this point, we have a Kotlin app. We need to add a few more Maven packages to make it a Spark app.
- Creating an AWS Lambda account
- Creating a simple Lambda function in Node.js
- Testing the Lambda function
- Creating Kotlin apps with Spark, IntelliJ IDEA, Maven, and the AWS library
- Binding the API gateway to your Lambda function
- Adding data with MongoDB
- Developing and debugging your Lambda function locally