Skip to content
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
4 changes: 3 additions & 1 deletion frameworks/fulmine/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ because they are where the framework differs from Express rather than where it i
- Routes with a parameter, `/json/:count` among them, are handed to the µWS router rather than
matched in JavaScript.
- A handler simple enough to be read at registration time is compiled into a µWS declarative
response. `/pipeline` is one, so it is answered without entering JavaScript.
response. `/pipeline` is one, so it is answered without entering JavaScript. "Simple enough" means
every argument is a literal, which is why its headers are written out instead of coming from the
shared `SERVER_HDR`: the compiler reads the source and cannot see into a closure.
- `express.compression()` is the framework's own, taking the compression module's options: it is
mounted on the json route, which is the only one the profiles ask to compress.
- `express.static(dir, { preCompressed: true })` is the framework's documented way of serving the
Expand Down
6 changes: 5 additions & 1 deletion frameworks/fulmine/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,12 @@ function sumQuery(query) {
return sum;
}

// Written out rather than through SERVER_HDR, and that is the whole of it: with every argument a
// literal, the framework compiles this handler into a uWS declarative response at listen() and the
// route is answered without entering JavaScript. A closure it cannot read keeps it on the ordinary
// path, which is what SERVER_HDR was doing here.
app.get('/pipeline', (req, res) => {
res.set(SERVER_HDR).type('text/plain').send('ok');
res.set({ 'server': 'fulmine' }).type('text/plain').send('ok');
});

// shared by the plaintext listener and the TLS one on 8081: same handler, same shapes
Expand Down
2 changes: 1 addition & 1 deletion frameworks/fulmine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "httparena-fulmine",
"private": true,
"dependencies": {
"fulmine.js": "^5.9.0",
"fulmine.js": "^5.11.0",
"pg": "^8.13.0",
"pg-native": "^3.8.0",
"ejs": "^3.1.10",
Expand Down
Loading