0.5.0 • Published 6 years ago

@pptr/testserver v0.5.0

Weekly downloads
98
License
Apache-2.0
Repository
github
Last release
6 years ago

TestServer

A testing server used to test Puppeteer itself.

Example

const {TestServer} = require('@pptr/testserver');

(async(() => {
  const httpServer = await TestServer.create(__dirname, 8000),
  const httpsServer = await TestServer.createHTTPS(__dirname, 8001)
  httpServer.setRoute('/hello', (req, res) => {
    res.end('Hello, world!');
  });
  console.log('HTTP and HTTPS servers are running!');
})();