-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.js
More file actions
19 lines (18 loc) · 733 Bytes
/
example.js
File metadata and controls
19 lines (18 loc) · 733 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
(function () {
var http = require('http'),
fs = require('fs');
http.createServer(function (req, res) {
if (req.url === '/dist/angular.url_matcher.js') {
res.writeHead(200, {'Content-Type': 'text/javascript'});
res.end(fs.readFileSync('./dist/angular.url_matcher.js'));
}
else if (req.url === '/dist/angular.url_matcher.min.js') {
res.writeHead(200, {'Content-Type': 'text/javascript'});
res.end(fs.readFileSync('./dist/angular.url_matcher.min.js'));
}
else {
res.writeHead(200, {'Content-Type': 'text/html'});
res.end(fs.readFileSync('./example.html'));
}
}).listen(8080, '127.0.0.1');
})();