https://github.com/xerial/airframe-http-demo
A demo project created at Airframe Meetup #2
https://github.com/xerial/airframe-http-demo
Last synced: 5 months ago
JSON representation
A demo project created at Airframe Meetup #2
- Host: GitHub
- URL: https://github.com/xerial/airframe-http-demo
- Owner: xerial
- Created: 2019-07-10T01:55:16.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-07-10T02:04:45.000Z (over 6 years ago)
- Last Synced: 2025-08-04T13:24:18.056Z (5 months ago)
- Language: Scala
- Homepage: https://airframe.connpass.com/event/137731/
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
airframe-http-demo
===
Live coding demo at [Airframe Meetup #2](https://airframe.connpass.com/event/137731/)
- [Presentation Slides](https://www.slideshare.net/taroleo/airframe-http-airframe-meetup-2-tokyo-20190709)
Packaging the project and launch a web server:
```
$ sbt pack
$ ./target/pack/bin/demo server -p 8080
```
Send http requests:
```
$ curl -X GET http://localhost:8080/v1/info
{"name":"demo-app","version":"0.1"}%
# Shutdown the server
$ curl -X GET http://localhost:8080/admin/shutdown
```
Run the web app using Docker:
```
$ sbt pack
$ docker build -t airframe-demo:latest .
$ docker run -p 8080:8080 -it airframe-demo:latest server -p 8080
```
Automatically restart the server when modifying the code:
```
$ sbt
> ~reStart server -p 8080
```