Skip to content

Minimal TCP server that returns time to a client deployed on Piku with Workers.

License

Notifications You must be signed in to change notification settings

matrixjnr/sample-java-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Maintainability Codacy Badge License

Sample Java Application for piku

asciicast

This is a simple Java app that demonstrates:

* HTTP port selection via the `PORT` variable (set in `ENV`)
* An independent worker process (that is auto-restarted upon exit) 

To publish this app to piku, clone the repository and run the following commands:

git clone git@github.com:matrixjnr/sample-java-app.git

Copy the contents to another folder excluding the .git folder. Then initialize the new git repo.

git init
git add .
git commit -am "Your Message"
git remote add piku piku@your_server:sample-java-app
git push piku master

Running the client

You should see New client connected in the logs. The server returns Time to the user.

asciicast

To Note

Creating workers that have dependencies should be precompiled and packaged jar files with dependencies so as to be run as follows:

worker: java -jar workersdir/test.jar

Otherwise running workers from class files with dependencies will throw errors.

About

Minimal TCP server that returns time to a client deployed on Piku with Workers.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages