puppeteer/packages/testserver
dependabot[bot] 3d1dd519ac
chore(deps): Bump ws from 8.12.1 to 8.13.0 (#9831)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-20 14:49:37 +00:00
..
src chore: Add EsLint rule import/order (#9685) 2023-02-15 15:09:31 -08:00
cert.pem chore: initiate monorepo migration (#9022) 2022-09-29 10:08:55 +02:00
CHANGELOG.md chore: release main (#9052) 2022-10-05 16:51:59 +02:00
key.pem chore: initiate monorepo migration (#9022) 2022-09-29 10:08:55 +02:00
LICENSE chore: initiate monorepo migration (#9022) 2022-09-29 10:08:55 +02:00
package.json chore(deps): Bump ws from 8.12.1 to 8.13.0 (#9831) 2023-03-20 14:49:37 +00:00
README.md chore: initiate monorepo migration (#9022) 2022-09-29 10:08:55 +02:00
tsconfig.json chore: initiate monorepo migration (#9022) 2022-09-29 10:08:55 +02:00

TestServer

This test server is used internally by Puppeteer 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!');
})();