Skip to content

Together-Java/JShellPlaygroundBackend

Repository files navigation

JShellPlaygroundBackend

Prerequisites

  • Java 21
  • Docker

Structure of the project

There are two projects, JShellAPI and JShellWrapper JShellAPI is a REST API, and whenever some code is received, it will create a session, by creating a docker container, which will run JShellWrapper inside and then execute the given code in JShellWrapper.

How to use JShellWrapper alone in local

From IntelliJ

  • Go in Run → Run... → Edit Configurations → create a configuration
  • Select the command JShellWrapper:run
  • Click on modify options, and check VM options
  • Then add evalTimeoutSeconds=15;sysOutCharLimit=1024 in the VM options
  • Press the run button image

How to use JShellAPI

From the console

  • Launch Docker
  • Run ./gradlew :JShellWrapper:jibDockerBuild to build the image
  • Run ./gradlew bootRun

How to build and run from IntelliJ

  • Launch Docker
  • Run JShellWrapper:jibDockerBuild to build the image
  • Run bootRun

How to build JShellAPI in and run it in Docker

  • Launch Docker
  • Run jibDockerBuild to create the image
  • Create a folder outside the project
  • cd to this folder
  • Copy docker-compose.yaml inside it
  • Optionally, create config/application.yaml where you can put custom config (see the actual application.yaml)
    • If you don't create it, delete the command: ["--spring.config.location=file:///home/backend/config/application.yaml"] line in the docker-compose.yaml
  • Run docker compose build or docker-compose build in the folder, depending on your version of Docker.
  • Run docker compose start or docker-compose start in the folder, depending on your version of Docker.
  • Note that some folders or files may be created automatically inside this folder
  • File tree representation:
-folder outside the project
    -docker-compose.yaml
    -config (optionnal)
        -application.yaml

How to use JShellApi ?

See JShellAPI README

About

API to execute custom JShell code.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 10

Languages

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy