Revision a0712da12574e39c5d8274b36dd14f41d6692f54 authored by Valeri Karpov on 20 December 2021, 00:36:15 UTC, committed by GitHub on 20 December 2021, 00:36:15 UTC
fix: allow use type string in $unset update with aggregation pipeline
2 parent s fb1d42d + b71e551
Raw File
static.js
'use strict';

const nodeStatic = require('node-static');
const server = new nodeStatic.Server('.', { cache: 0 });

require('http').createServer(function(req, res) {
  if (req.url === '/favicon.ico') {
    req.destroy();
    res.statusCode = 204;
    return res.end();
  }

  req.on('end', function() {
    server.serve(req, res, function(err) {
      if (err) {
        console.error(err, req.url);
        res.writeHead(err.status, err.headers);
        res.end();
      }
    });
  });
  req.resume();
}).listen(8089);

console.error('now listening on http://localhost:8089');
back to top