Skip to content
Open
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
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
all:
@./run aero.js
@./run express.js
@./run hapi.js
@./run rawnode.js
Expand All @@ -16,6 +17,7 @@ all:
@echo 'Simple HTTP benchmark results (wrk) with close connection' | tee -a benchmarks.txt
@sort -nr results.txt | tee -a benchmarks.txt
@rm results.txt
@./run aero.js keep-alive
@./run express.js keep-alive
@./run hapi.js keep-alive
@./run rawnode.js keep-alive
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"postinstall": "make"
},
"dependencies": {
"aero": "^2.0.8",
"express": "^4.15.2",
"feathers": "^2.1.1",
"hapi": "^16.1.1",
Expand Down
29 changes: 29 additions & 0 deletions servers/aero.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
global.Promise = require('bluebird');
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't need this, since we're using native

Copy link
Author

@nodefish nodefish Jun 17, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough. I used it because the author uses it in his own benchmark. You're right, probably better to remove it.


const AeroServer = require('aero/lib/Server');
const server = new AeroServer();

const headers = {
'Connection': 'close'
};

server.routes.GET = {
'': function(request, response) {
response.writeHead(200, headers);
response.end("Hello World!");
},

'keep-alive': function(request, response) {
response.end("Hello World!");
}
};

server.run({
config: {
ports: {
http: 8000
}
}
}).then(()=>{
console.log('AeroJS listening @ port 8000');
});