Deploy Javelit App
A template to quickly deploy Javelit apps.
jbang
jbangdev/jbang:0.132.1-java-21
Just deployed
Deploy and Host your Javelit App (standalone mode) on Railway
Javelit is a Java lightning fast data app development framework. Write your webapp as a simple Java class and deploy it in a minute with this railway template!
Learn more on GitHub.
About Hosting Javelit App
This app uses the jbang docker image to launch Javelit, pointing to the app you provide via the APP_URL
variable.
Your webapp is then deployed and available on the web with fully secured https and wss (secured websocket).
This app can automatically refresh if the code at the URL is changed. Enable this feature by passing a refresh interval in the SOURCE_REFRESH_INTERVAL variable.
Common Use Cases
Everything Java that needs a frontend!
- demo app
 - analytics dashboard
 - interactive data app
 - ML/AI app
 - admin app
 - notebooks
 - devrel presentations
 
Dependencies for Javelit Hosting
- Java 21
 - jbang
 - Javelit
 - add dependencies using JBang-style 
//DEPScomments at the top of your file. 
Deployment Dependencies
Implementation Details
- Once the app is deployed, enable serverless to make the Javelit app scale to zero when it's not used.
 - Make sure to set the RAM and CPU according to your app requirements. The trial plan of railway may not be able to support ML/AI use cases.
 - If you tune the RAM and CPU, make sure to update the 
JBANG_JAVA_OPTIONSvariable that contains the JVM options. The default values are tuned for the Railway free trial. 
Why Deploy Javelit App on Railway?
Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.
By deploying Javelit App on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.
Template Content
APP_URL
A public URL pointing to the app file. You can provide a link to a github folder if the app uses other files. If a link to a folder is provided, the entrypoint should be called Main.java or App.java or there should be a unique Java class at the root of the folder. Supported values: (1) A direct link to a text/plain .java file: https://raw.githubusercontent.com/user/repo/branch/file.java. (2) A GitHub repository URL: https://github.com/user/repo. A GitHub folder tree URL : https://github.com/user/repo/tree/branch/path/to/folder. (4)A GitHub file blob URL: https://github.com/javelit/javelit/blob/main/examples/getting_started/App.java