The original post: /r/nginx by /u/Menosa on 2024-07-02 20:23:48.

I am working with a Kotlin Multiplatform project that you can view here on GitHub. I started by using the Kotlin Multiplatform Wizard and selected the Web platform option, everything else remains unchanged.

Here’s what I’ve done:

  • Ran the ./gradlew build command.
  • When I attempt to open the index.html file directly, either one of this directories,the page remains blank.
  • However, when I run ./gradlew wasmJsBrowserProductionWebpack, the site launches successfully and is served by the WebPack server.

I would like to serve this project using Nginx instead of WebPack. Could someone advise on the necessary Gradle build configurations to generate a directory structure that Nginx can use effectively?

Additionally, I would appreciate guidance on setting up the nginx.conf file for this purpose.