UNPKG
bar
Version:
latest (0.1.2)
stable (0.1.2)
0.1.2
0.1.1
0.1.0
Node.js framework for building large modular web applications
github.com/indutny/bar
indutny/bar
bar
/
examples
/
simple
/
drinkers
/
index-page.js
15 lines
(11 loc)
•
267 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
name
('index-page'); function
requestHandler
(req, res) { if (req.url == '/') { res
.writeHead
(
200
); res
.end
('hehey!
12345
'); } };
snap
('http.request', requestHandler);
on
('leave.index-page', function() {
emit
('http.removeHandler', requestHandler); });