@pptr/testserver
v0.5.0
Published
testing server
Downloads
47
Readme
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!');
})();