A play framework (2.5.0) example which does the follows:
(original features on 2016/03/19)
- upon visiting the webpage, a websocket will be created.
- users can put in a url (need to prefixed with http://)
- the url is sent to webserver.
- webserver will read the content from the url, fix any HTML ill-form, and extract the title string.
- the extracted title string will be send back to the client through the same websocket
- the client side will show the resultant title string
(updated on 2016/03/20)
- whole client side is recoded using angularjs and bootstrap3
- websocket is handled in the angularjs application
All message communications on the websockets are in json. (using the play-json library)
activator dist
which will give you a production version,./target/universal/play-scala-1.0-SNAPSHOT.zip
unzip ./target/universal/play-scala-1.0-SNAPSHOT.zip
, you will seeplay-scala-1.0-SNAPSHOT/
- To deploy the webserver app, run
play-scala-1.0-SNAPSHOT/bin/play-scala