@pptr/testserver

0.5.0 • Public • Published

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!');
})();

Readme

Keywords

none

Package Sidebar

Install

npm i @pptr/testserver

Weekly Downloads

5

Version

0.5.0

License

Apache-2.0

Unpacked Size

24.7 kB

Total Files

6

Last publish

Collaborators

  • mathias
  • natorion
  • jschfflr
  • paulirish