@pptr/testserver

testing server


Summary

Project Name @pptr/testserver Project Url
InceptionYear 2018-09-22 01:59:41 更新时间 2018-09-22 09:59:41
IssueManagement Licenses Apache-2.0
仓库地址 https://github.com/GoogleChrome/puppeteer/tree/master/utils/testserver 用户数 0
Node Engine 文件大小 10.8 KB
install test

项目介绍

# TestServer A testing server used to test Puppeteer itself. ### Example ```js 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!'); })(); ```