This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require("express"); | |
const { JSDOM } = require("jsdom"); | |
const app = express(); | |
const port = 6969; | |
app.use(express.static("assets")); | |
app.get("/", (req, res) => { | |
const dom = new JSDOM(`<!DOCTYPE html>`); | |
const doc = dom.window.document; | |
// Use doc instead of document |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require("express"); | |
const { JSDOM } = require("jsdom"); | |
const app = express(); | |
const port = 6969; | |
app.use(express.static("assets")); | |
app.get("/", (req, res) => { | |
const dom = new JSDOM(`<!DOCTYPE html>`); | |
const doc = dom.window.document; | |
const body = doc.querySelector("body"); |