git ssb

0+

cel-desktop / ssb-pkg



Tree: 65191f9a9664f013ebe726bb95a1a54b086e1bd5

Files: 65191f9a9664f013ebe726bb95a1a54b086e1bd5 / test / test-79-npm / feathers / feathers.js

620 bytesRaw
1'use strict';
2
3var feathers = require('feathers');
4var http = require('http');
5var app = feathers();
6
7app.get('/', function (req, res) {
8 res.end('Hello there!');
9});
10
11var server = app.listen(1337, function () {
12 var port = server.address().port;
13 setTimeout(function () {
14 http.get('http://127.0.0.1:' + port.toString() + '/', function (res) {
15 var chunks = '';
16 res.on('data', function (chunk) {
17 chunks += chunk.toString();
18 }).on('end', function () {
19 if (chunks === 'Hello there!') {
20 console.log('ok');
21 }
22 server.close();
23 });
24 });
25 }, 100);
26});
27

Built with git-ssb-web