Skip to content

Commit

Permalink
re-enable rayo (#246)
Browse files Browse the repository at this point in the history
  • Loading branch information
waghanza committed Jun 11, 2018
1 parent 1a556ed commit a869573
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 1 deletion.
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
- rayo

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

0 comments on commit a869573

Please sign in to comment.