IntelliJ

First of the .*iml files do not have anything to do with your code. It is only a file created by the IDE to contain module information.

If you are using maven you can reimport your projects modules as follows:
Go to File > Project Structures > Modules > Add > Import Modules > > OK.

After that you have to go to the maven Tool window and click on the reimport button.

Deleted .iml File in IntelliJ

Unfortunately i somehow deleted my Applications .iml file. Now my Project somehow seems broken because my modules are not displayed anymore.

In IntelliJ, start by creating a new Kotlin project. You will be asked to choose the project type, at which point you can choose a pure frontend application or a full-stack web application depending on what suits your needs best. You may need to wait a few minutes for all the necessary dependencies to finish downloading.
You should then see your project. Within the src/main directory you will be able to find your main .kt file containing the script's starting point and an index.html file in the resources directory. Note that inside of the HTML file, the only script that is linked is one .js file, named the same as your project. This file will be generated at compile-time and will contain all your compiled Kotlin code.

To run the project, you can bring up the Gradle tool window from the View menu, and run the browserDevelopmentRun Gradle task to run your project for the first time. This may take a couple of minutes the first time you do it.
However, you probably don't want to be manually stopping and restarting your web server every time you make a change to a file. By bringing up your run configurations tool window, you can edit the newly created browserDevelopmentRun configuration. In the Arguments text field, add the argument --continuous and save your changes. Upon next run, this will make the system continuously listen for changes and update your browser automatically.

OperatingSystem:

ProgrammingLanguage:

Technology:

Set up a development environment for Kotlin/React

I wish to develop web applications in Kotlin, since the type safety and the advanced features make the development experience a lot more pleasant. Kotlin can be compiled to Javascript and ran in the browser, but the current guide on how to do this is slightly outdated.

Subscribe to IntelliJ