0
0
mirror of https://github.com/puppeteer/puppeteer synced 2024-06-14 14:02:48 +00:00
puppeteer/packages/testserver
dependabot[bot] 634d5b805d
chore(deps-dev): Bump the dev-dependencies group with 13 updates ()
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Nikolay Vitkov <nvitkov@chromium.org>
2024-02-14 18:20:12 +00:00
..
src test: rework test expectations () 2024-02-05 11:04:41 +00:00
cert.pem chore: initiate monorepo migration () 2022-09-29 10:08:55 +02:00
CHANGELOG.md chore: release main () 2022-10-05 16:51:59 +02:00
key.pem chore: initiate monorepo migration () 2022-09-29 10:08:55 +02:00
LICENSE chore: initiate monorepo migration () 2022-09-29 10:08:55 +02:00
package.json chore: small fixes () 2024-01-31 16:01:27 +01:00
README.md chore: initiate monorepo migration () 2022-09-29 10:08:55 +02:00
tsconfig.json chore(deps-dev): Bump the dev-dependencies group with 13 updates () 2024-02-14 18:20:12 +00:00
tsdoc.json chore: update license headers () 2024-01-03 10:11:33 +00: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!');
})();