Skip to content

Commit

Permalink
Deps update (the-benchmarker#368)
Browse files Browse the repository at this point in the history
* use io (stderr chanel) instead of file on benchmark (the-benchmarker#365)

* [Japronto] Support multicore (the-benchmarker#366)

* support multicore

* Support multicore

* fix typo

* update koa to 2.5.3 (the-benchmarker#367)

* setup dependencies.io

* specify python version on dependencies.yml

* specify python version under x.y.z format for deps
  • Loading branch information
waghanza committed Oct 5, 2018
1 parent a34ffe6 commit 05a9430
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 4 deletions.
65 changes: 65 additions & 0 deletions dependencies.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
version: 2

dependencies:

- type: python
path: python/flask/requirements.txt

- type: python
path: python/tornado/requirements.txt

- type: python
path: python/quart/requirements.txt
settings:
python_version: 3.6.6

- type: python
path: python/bottle/requirements.txt

- type: python
path: python/vibora/requirements.txt
settings:
python_version: 3.6.6

- type: python
path: python/aiohttp/requirements.txt
settings:
python_version: 3.6.6

- type: python
path: python/sanic/requirements.txt

- type: python
path: python/japronto/requirements.txt
settiings:
python_version: 3.6.6

- type: python
path: python/django/requirements.txt

- type: js
path: node/restify/package.json

- type: js
path: node/express/package.json

- type: js
path: node/fastify/package.json

- type: js
path: node/hapi/package.json

- type: js
path: node/polka/package.json

- type: js
path: node/koa/package.json

- type: js
path: node/rayo/package.json

- type: php
path: php/symfony/composer.json

- type: php
path: php/laravel/composer.json
4 changes: 2 additions & 2 deletions node/koa/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"dependencies": {
"koa": "2.5.1",
"koa-router": "7.4.0"
"koa": "~2.5.3",
"koa-router": "~7.4.0"
}
}
2 changes: 1 addition & 1 deletion python/japronto/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ COPY requirements.txt server.py ./

EXPOSE 3000

CMD python server.py
CMD python server.py $(nproc)
4 changes: 3 additions & 1 deletion python/japronto/server.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import sys

from japronto import Application


Expand All @@ -18,4 +20,4 @@ def get_user(request):
app.router.add_route('/user', create_user, 'POST')
app.router.add_route('/user/{id}', get_user, 'GET')

app.run(host='0.0.0.0', port=3000)
app.run(host='0.0.0.0', worker_num=int(sys.argv[1]), port=3000)

0 comments on commit 05a9430

Please sign in to comment.