Skip to content

Commit a869573

Browse files
committed
re-enable rayo (#246)
1 parent 1a556ed commit a869573

File tree

6 files changed

+35
-1
lines changed

6 files changed

+35
-1
lines changed

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ phoenix:
1010
docker build -t phoenix elixir/phoenix
1111

1212
# --- node.js ---
13-
node: express fastify polka
13+
node: express fastify polka rayo
1414

1515
express:
1616
docker build -t express node/express
@@ -21,6 +21,9 @@ fastify:
2121
polka:
2222
docker build -t polka node/polka
2323

24+
rayo:
25+
docker build -t rayo node/rayo
26+
2427
# --- Objective-C ---
2528
objc: criollo
2629

neph.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ node:
7070
- express
7171
- fastify
7272
- polka
73+
- rayo
7374

7475
elixir:
7576
depends_on:
@@ -224,6 +225,10 @@ polka:
224225
command: docker build -t polka .
225226
dir: node/polka
226227

228+
rayo:
229+
command: docker build -t rayo .
230+
dir: node/rayo
231+
227232
plug:
228233
command: docker build -t plug .
229234
dir: elixir/plug

node/rayo/Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM node
2+
3+
RUN npm -g install pm2
4+
5+
WORKDIR /usr/src/app
6+
7+
COPY app.js package.json ./
8+
9+
RUN npm install
10+
11+
ENV NODE_ENV production
12+
13+
CMD pm2-runtime start app.js -i $(nproc)

node/rayo/app.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
const rayo = require('rayo');
2+
3+
rayo({ port: 3000 })
4+
.get('/', (req, res) => res.end(''))
5+
.get('/user/:id', (req, res) => res.end(req.params.id))
6+
.post('/user', (req, res) => res.end(''))
7+
.start();

node/rayo/package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"dependencies": {
3+
"rayo": "~1.0.4"
4+
}
5+
}

tools/src/benchmarker.cr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ LANGS = [
7676
{name: "express", repo: "expressjs/express"},
7777
{name: "fastify", repo: "fastify/fastify"},
7878
{name: "polka", repo: "lukeed/polka"},
79+
{name: "rayo", repo: "GetRayo/rayo.js"},
7980
]},
8081
{lang: "elixir", targets: [
8182
{name: "plug", repo: "elixir-lang/plug"},

0 commit comments

Comments
 (0)