at this location in this kotlin javascript tutoria...
# javascript
d
at this location in this kotlin javascript tutorial he is typing
src=
and magically gets an
out
folder to choose, how do I configure my kotlin javascript module to do that? (my out is located on another drive, I "Inherit project compile output path" in the module) I can't figure out the correct path to use in my
src=
for my code to run (I get 404 not found errors in the browser)

https://youtu.be/rRC5m1U5snM?t=154

Do you think that intellij web server requires out to be in the same folder as the src folder?
k
Do you think that intellij web server requires out to be in the same folder as the src folder?
I'm not sure, but AFAK, IntelliJ built-in web server serves files from the directory where html file is located and from all subdirectories. If your output location is in another drive, it won't be served
d
I just tried it, got it to work by moving out into the same folder as src.. It's a bit ugly this way (having output in my project folder) but at least it is working now
k
Don't keep your
index.html
in src folder. The structure might be like this: * index.html * src/*.kt * build/... Where
build
is output dir where compiler puts JS files.
What's the problem to have output in project folder? I can see no ugliness in it
d
yes index is on same level as "src" and "out" now
well sometimes i like to 7zip the project folder as another backup.. I do it for offsite backup because 7zip files are small, I can modify it later to ignore that subfolder but I have a bunch of modules, easiest way is just to put output in another location. Anyhow I just always like to keep my output files outside of the project folder
k
You can use github as a backup media 🙂
Or just keep your code under git and use
git archive
Of course, `out`/`build`/`target` dir should be in
.gitignore
n
Now have confirmation (confirms my suspicions) that IntelliJ has its own web server, which has been used successfully with Kotlin JS and Gradle Kotlin DSL (https://github.com/gradle/kotlin-dsl). 💎