mirror of
https://github.com/debug-js/debug.git
synced 2025-12-08 20:59:48 +00:00
21 lines
383 B
JavaScript
21 lines
383 B
JavaScript
const http = require('http');
|
|
|
|
const debug = require('../..')('http');
|
|
|
|
const name = 'My App';
|
|
|
|
// Fake app
|
|
|
|
debug('booting %o', name);
|
|
|
|
http.createServer((req, res) => {
|
|
debug(req.method + ' ' + req.url);
|
|
res.end('hello\n');
|
|
}).listen(3000, () => {
|
|
debug('listening');
|
|
});
|
|
|
|
// Fake worker of some kind
|
|
// eslint-disable-next-line import/no-unassigned-import
|
|
require('./worker');
|