Skip to content
This repository has been archived by the owner on Jul 13, 2021. It is now read-only.

Add example of sharing code between both frontend and backend #32

Open
Zomis opened this issue Dec 11, 2017 · 1 comment
Open

Add example of sharing code between both frontend and backend #32

Zomis opened this issue Dec 11, 2017 · 1 comment

Comments

@Zomis
Copy link

Zomis commented Dec 11, 2017

Add some common module, or common code somewhere, that both frontend and backend has a dependency on.

I have read these two discussions:
https://discuss.kotlinlang.org/t/kotlin-to-javascript-and-kotlin-to-jvm-servlets-in-one-project/2600
https://discuss.kotlinlang.org/t/compiling-kotlin-to-both-java-and-javascript-from-the-same-module/1944

The second one contained a link to a project which modifies the main.kotlin.srcDirs by adding project(':').file('src/main/kotlin'), this however lead me to an issue with compiler errors in IntelliJ, which can be seen here: C06A/KUrlet#1

So a clear example of how to actually share code between JS and JVM is appreciated.

@yole
Copy link
Contributor

yole commented Dec 12, 2017

See https://github.com/jetbrains/kotlinconf-app and https://github.com/yole/kxhtml-isomorphic for other example projects that demo this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants