https://github.com/mmhelloworld/hello-play-frege
A simple Play application with Frege
https://github.com/mmhelloworld/hello-play-frege
Last synced: over 1 year ago
JSON representation
A simple Play application with Frege
- Host: GitHub
- URL: https://github.com/mmhelloworld/hello-play-frege
- Owner: mmhelloworld
- License: other
- Created: 2015-11-23T05:12:35.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-11-23T05:34:09.000Z (over 10 years ago)
- Last Synced: 2024-02-13T04:39:06.688Z (over 2 years ago)
- Language: Frege
- Homepage:
- Size: 12.7 KB
- Stars: 19
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
#A simple Play application with Frege#
This is a simple play application written in Frege to demonstrate how we can use Frege with Play.
Since Play supports Java, it is actually very easy to use the Java API from Frege
even though we don't have native Play support for Frege yet.
The application is basically JSON-in and JSON-out.
A Frege program reads a parameter from a JSON POST request and responds with a JSON response that greets the user.
##How to run##
1. Run `activator run` to compile and start the server.
1. Then send a JSON post request.
For example, with `curl`:
```
$ curl --header "Content-type: application/json" --request POST --data '{"name": "Play Frege"}' http://localhost:9000/greet
{"message" : "Hello, Play Frege"}
```