Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jaehyeon-kim/r-api-demo
Investigate API Development with R
https://github.com/jaehyeon-kim/r-api-demo
api plumber r rapache rserve
Last synced: 3 months ago
JSON representation
Investigate API Development with R
- Host: GitHub
- URL: https://github.com/jaehyeon-kim/r-api-demo
- Owner: jaehyeon-kim
- Archived: true
- Created: 2017-11-09T10:01:39.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-11-17T11:21:11.000Z (almost 7 years ago)
- Last Synced: 2024-06-05T02:34:58.467Z (5 months ago)
- Topics: api, plumber, r, rapache, rserve
- Language: R
- Homepage:
- Size: 4.88 KB
- Stars: 7
- Watchers: 3
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- jimsghstars - jaehyeon-kim/r-api-demo - Investigate API Development with R (R)
README
## R API DEMO
Investigate API Development with R - [plumber](https://github.com/trestletech/plumber), [Rserve](https://www.rforge.net/Rserve/) and [rApache](http://rapache.net/).
### Docker
```
## build
docker build -t=api ./api/.## run
# rApache - 7000, Rserve - 8000, plumber - 9000
# all APIs managed by supervisor
docker run -d -p 7000:80 -p 8000:8000 -p 9000:9000 --name api api:latest
```### CURL
```
# change port accordingly
curl -H "Content-Type: application/json" -X POST -d '{"n": 10, "wait": 0.5}' http://localhost:7000/test
```### Performance Test
```
## locust - only available for Python 2
# pip install locustiolocust -f ./locustfile.py --host http://localhost:7000 --no-web -c 1 -r 1
```