Skip to content

Instantly share code, notes, and snippets.

;(async () => {
const browser = await puppeteer.launch()
const page = await browser.newPage()
await page.setBypassCSP(true)
await page.goto("http://localhost:8000")
const results = await new AxePuppeteer(page)
.analyze()
if (results.violations.length > 0) {
log(chalk.red.bold("Axe violations:"))
server.on("request", (req, res) => {
const src = fs.createReadStream("./index.html");
src.pipe(res)
})
console.log(`Running on port ${port}`);
server.listen(port);
package main
import (
"fmt"
"io/ioutil"
"net/http"
"strconv"
"strings"
"time"
)