Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-enable rayo #246

Merged
merged 1 commit into from
Jun 11, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ phoenix:
docker build -t phoenix elixir/phoenix

# --- node.js ---
node: express fastify polka
node: express fastify polka rayo

express:
docker build -t express node/express
Expand All @@ -21,6 +21,9 @@ fastify:
polka:
docker build -t polka node/polka

rayo:
docker build -t rayo node/rayo

# --- Objective-C ---
objc: criollo

Expand Down
5 changes: 5 additions & 0 deletions neph.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ node:
- express
- fastify
- polka
- node

elixir:
depends_on:
Expand Down Expand Up @@ -224,6 +225,10 @@ polka:
command: docker build -t polka .
dir: node/polka

rayo:
command: docker build -t rayo .
dir: node/rayo

plug:
command: docker build -t plug .
dir: elixir/plug
Expand Down
13 changes: 13 additions & 0 deletions node/rayo/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM node

RUN npm -g install pm2

WORKDIR /usr/src/app

COPY app.js package.json ./

RUN npm install

ENV NODE_ENV production

CMD pm2-runtime start app.js -i $(nproc)
7 changes: 7 additions & 0 deletions node/rayo/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const rayo = require('rayo');

rayo({ port: 3000 })
.get('/', (req, res) => res.end(''))
.get('/user/:id', (req, res) => res.end(req.params.id))
.post('/user', (req, res) => res.end(''))
.start();
5 changes: 5 additions & 0 deletions node/rayo/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"dependencies": {
"rayo": "~1.0.4"
}
}
1 change: 1 addition & 0 deletions tools/src/benchmarker.cr
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ LANGS = [
{name: "express", repo: "expressjs/express"},
{name: "fastify", repo: "fastify/fastify"},
{name: "polka", repo: "lukeed/polka"},
{name: "rayo", repo: "GetRayo/rayo.js"},
]},
{lang: "elixir", targets: [
{name: "plug", repo: "elixir-lang/plug"},
Expand Down