https://github.com/jj/spray-test
Pruebas con spray.io para servidores REST.
https://github.com/jj/spray-test
cloud computing hacktoberfest
Last synced: 10 months ago
JSON representation
Pruebas con spray.io para servidores REST.
- Host: GitHub
- URL: https://github.com/jj/spray-test
- Owner: JJ
- Created: 2016-10-12T07:23:49.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2020-10-21T14:21:27.000Z (about 5 years ago)
- Last Synced: 2025-02-06T07:45:56.210Z (11 months ago)
- Topics: cloud, computing, hacktoberfest
- Language: Scala
- Homepage: https://jj.github.io/CC
- Size: 95.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## ejemplo de uso de _spray_ a partir del *Template Project*
Este proyecto usa Scala 2.11 + Akka 2.3 + spray 1.3 + openjdk 1.8.
## DEPRECATION NOTICE
No intentes que funcione, ya que spray.ok lleva sin ningún tipo de
desarrollo desde hace 4 años.
Al final, una pérdida de tiempo. Ni se usa ya spray ni puede usar lo
que yo creo que quiere usar. El tema de persistencia es complicado en
lenguajes concurrentes y tendré que mirar más sobre el tema.
Follow these steps to get started:
1. Git-clone this repository.
$ git clone git://github.com/JJ/spray-test my-project
2. Change directory into your clone:
$ cd my-proyect
3. Launch SBT:
$ sbt
4. Compile everything and run all tests:
> test
5. Start the application:
> re-start
6. Browse to [http://localhost:8080](http://localhost:8080/)
8. Ejecuta una serie de pruebas:
```
$ curl http://localhost:8080
["routes", "get,post"]
$ curl -X PUT http://localhost:8080/0/0/Uno
{
"local": 0,
"visitante": 0,
"quien": "Uno"
}
$ curl -X PUT http://localhost:8080/0/1/Otro
{
"local": 0,
"visitante": 1,
"quien": "Otro"
}
$ curl -X PUT http://localhost:8080/3/1/Aquel
{
"local": 3,
"visitante": 1,
"quien": "Aquel"
}
$ curl http://localhost:8080/Aquel
{
"local": 3,
"visitante": 1,
"quien": "Aquel"
}
```
7. Stop the application:
> re-stop
8. Learn more at http://www.spray.io/
9. Start hacking on `src/main/scala/com/example/MyService.scala`