Code Monkey home page Code Monkey logo

kotlin-web-demo's Introduction

official JetBrains project

This repository contains sources for try.kotl.in

Manual installation ๐Ÿณ

Before starting the Kotlin-Web-Demo execute two gradle tasks: copyKotlinLibs for downloading kotlin libraries for compiler and war for building war-archive from IDE or terminal:

$ gradlew ::copyKotlinLibs
$ gradlew war

By default try.kotl.in uses port 8080, and if that's OK, just make it available at http://localhost:8080 via this command:

$ docker-compose up

To change the port number, tweak 'docker-compose.yml':

    ports:
      - "your_port:8080"

If you'd like to log in to JetBrains account, Google, Facebook, GitHub, or Twitter, add corresponding keys to this configuration file:

    <Environment name="github_key" value="YOUR-KEY" type="java.lang.String" override="false"/>
    <Environment name="github_secret" value="YOUR-SECRET-KEY" type="java.lang.String" override="false"/>

How to add your own courses ๐Ÿ“

  • Add a course name to manifest.json.
  • Use that name to create a folder next to the Examples folder and put your course content under it.
  • Make a folder for each of the course topics (and don't forget adding them to manifest.json).
  • After that, create:
    1. Test.kt โ€” for test questions
    2. Task.kt โ€” for preview
    3. Solution.kt โ€” for answers to the test questions
    4. task.md - tasks descriptions
    5. manifest.json - to store 'junit' configuration

See Kotlin-Koans for examples.

How to add your dependencies to kotlin compiler ๐Ÿ“š

Just put whatever you need as dependencies to gradle.build via gradle task called library:

 library "your dependency"

NOTE: If the library you're adding uses reflection, accesses the file system, or performs any other type of security-sensitive operations, don't forget to configure the executors.policy.template in web-demo-backend. Click here for more information about Java Security Police

How to set Java Security Police in executors.policy.template

If you want to a customm dependency, use the marker @WRAPPERS_LIB@:

grant codeBase "file:@WRAPPERS_LIB@/junit-4.12.jar" {
  permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
  permission java.lang.RuntimePermission "setIO";
  permission java.io.FilePermission "<<ALL FILES>>", "read";
  permission java.lang.RuntimePermission "accessDeclaredMembers";
};

Feedback and Issue reporting ๐Ÿ‘ท

We're constantly working on making it easier to add your own courses to try.kotl.in and would appreciate ideas, suggestions, and other feedback, so if you have any, please use our issue tracker to share it with us.

And, of course, if you have any bug reports, you can file them as well If you need any help with compiling or running the project locally, join the #kontributors channel in the Kotlin Slack, and we'll be happy to help you out.

kotlin-web-demo's People

Contributors

abreslav avatar alexanderprendota avatar andr3nun3s avatar anton-bannykh avatar bashor avatar dalinaum avatar dipanshkhandelwal avatar gildor avatar harmitage avatar ilya-g avatar nataliaukhorskaya avatar noia avatar rayshade avatar satamas avatar svtk avatar tginsberg avatar udalov avatar yole avatar yu-ishicawa avatar zarechenskiy avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.