{"id":15138487,"url":"https://github.com/colinzhu/web-console","last_synced_at":"2025-10-23T15:30:21.321Z","repository":{"id":167589437,"uuid":"643213978","full_name":"colinzhu/web-console","owner":"colinzhu","description":"A super simple java tool that allows you to run a task from a web browser and see the output in real time. ","archived":false,"fork":false,"pushed_at":"2023-06-01T16:27:39.000Z","size":28,"stargazers_count":10,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-30T19:08:08.849Z","etag":null,"topics":["console","logging","vertx","web-console"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/colinzhu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-20T13:04:43.000Z","updated_at":"2023-06-09T15:49:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"8552d510-ca2b-416e-ad37-1c6346dea1bd","html_url":"https://github.com/colinzhu/web-console","commit_stats":null,"previous_names":["colinzhu/web-console"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colinzhu%2Fweb-console","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colinzhu%2Fweb-console/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colinzhu%2Fweb-console/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colinzhu%2Fweb-console/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/colinzhu","download_url":"https://codeload.github.com/colinzhu/web-console/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237843769,"owners_count":19375201,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["console","logging","vertx","web-console"],"created_at":"2024-09-26T07:40:19.396Z","updated_at":"2025-10-23T15:30:20.987Z","avatar_url":"https://github.com/colinzhu.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Web Console\n\nWeb Console is a super simple java tool that allows you to: \n1. from a web browser, trigger a task to run  \n2. and from the web browser, see the output in real time\n\n## Usage with example\nSuppose you have a task that prints “Hello, world!” n times, where n is a parameter. You want to trigger it to run from a web browser and see the output in real time.\n\n```java\npublic class HelloWorld {\n    public static void main(String[] args) {\n        int n = Integer.parseInt(args[0]); // get the parameter from args\n        for (int i = 0; i \u003c n; i++) {\n            System.out.println(\"Hello, world!\"); // print to standard output\n        }\n    }\n}\n```\nStep 1: Add the dependency into your project:\n   ```xml\n   \u003cdependency\u003e\n       \u003cgroupId\u003eio.github.colinzhu\u003c/groupId\u003e\n       \u003cartifactId\u003eweb-console\u003c/artifactId\u003e\n       \u003cversion\u003e0.1.2\u003c/version\u003e\n   \u003c/dependency\u003e\n   ```\nStep 2: write a method which wraps the original task using `WebConsole.start(...)` like below.\n\n```java\nimport io.github.colinzhu.webconsole.WebConsole;\n\npublic class App {\n    public static void main(String[] args) {\n        WebConsole.start(HelloWorld::main, 8082); // start the web console with HelloWorldTask and port 8082\n    }\n}\n```\nStep 3: run your App.main(), and go to http://localhost:8082 and enter 5 as the parameter and click the \"Start\" button, you will see this output:\n\n```text\nWelcome to the web console!\nIs the task running? false\n5\nHello, world!\nHello, world!\nHello, world!\nHello, world!\nHello, world!\n```\n\n## Example with SSL\nTo start the web console with SSL:\n\n```java\nimport io.github.colinzhu.webconsole.WebConsole;\nimport io.vertx.core.http.HttpServerOptions;\nimport io.vertx.core.net.PemKeyCertOptions;\n\npublic class App {\n    public static void main(String[] args) {\n        // Example to start web console with SSL e.g. https://example.xyz:8082\n        HttpServerOptions options = new HttpServerOptions()\n                .setPort(8082)\n                .setSsl(true)\n                .setHost(\"example.xyz\")\n                .setKeyCertOptions(new PemKeyCertOptions().setCertPath(\"chain.pem\").setKeyPath(\"private_key.pem\"));\n        WebConsole.start(HelloWorldTask::main, options);\n    }\n}\n```\n\n## Customize the UI page\nWeb Console comes with a default UI page\n\nYou can customize UI page by creating your own index.html and put it into classpath as `/web/index.html`, for example create a file `resources/web/index.html` in your project\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcolinzhu%2Fweb-console","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcolinzhu%2Fweb-console","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcolinzhu%2Fweb-console/lists"}