https://github.com/ziozzang/jython-apiserver
simple jython api server to integrate legacy java code.
https://github.com/ziozzang/jython-apiserver
api-rest api-server flask-like java java-8 jython spark-core
Last synced: about 2 months ago
JSON representation
simple jython api server to integrate legacy java code.
- Host: GitHub
- URL: https://github.com/ziozzang/jython-apiserver
- Owner: ziozzang
- License: mit
- Created: 2025-01-17T13:38:24.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-17T13:56:46.000Z (over 1 year ago)
- Last Synced: 2025-09-13T01:30:04.631Z (9 months ago)
- Topics: api-rest, api-server, flask-like, java, java-8, jython, spark-core
- Language: Python
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Jython based simple API server example
Very Simple API server with Jython using spark-core. it looks like flask server, but java. this technics are very useful when you integrate legacy java code with other platform.
This code is very simple using/conversion from JAVA library or code into JSON/POST or GET APIs.
This code can be simple starting point to reuse old java code. ;)
# tested env.
- tested on OpenJDK 8 env.
# test as client
```
curl -X POST -H "Content-Type: application/json" -d '{"text":"some-text"}' http://localhost:8080/strlen
curl http://localhost:8080/strlen?text=some-text
curl http://localhost:8080/strlen/some-text
```
# License
MIT