Added the Porter Stemmer module to improve searches. This doesn't deal with some...
[yaffs-website] / node_modules / xhr / test / mock-server.js
1 module.exports = function (req, res) {
2     console.log('mock:',req.url)
3     if (req.url === '/mock/200ok') {
4         res.statusCode = 200
5         res.end('')
6     } else if (req.url === '/mock/no-content') {
7         res.statusCode = 204
8         res.end('')
9     } else if (req.url === '/mock/timeout') {
10         setTimeout(function() {
11             res.statusCode = 200
12             res.end()
13         }, 100)
14     } 
15 }