diff --git a/index.ts b/index.ts index 227711a..7d004a4 100644 --- a/index.ts +++ b/index.ts @@ -5,6 +5,7 @@ import got from "got"; import path from "path"; import { fileURLToPath } from "url"; import fetch from 'node-fetch' +import "dotenv/config"; const app = express(); const port = 8888; @@ -45,13 +46,23 @@ app.get("/", async (req, res) => {

${result.title}

${result.url} - +

${result.description}

+
`); }) - res.send(results.join('')) + res.send(` + + + + Blaze The Page + + + ${results.join("")} + + `); }) }) .catch((err) => { diff --git a/package-lock.json b/package-lock.json index 1aeb848..7ea10be 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,6 +10,7 @@ "license": "ISC", "dependencies": { "@mozilla/readability": "^0.4.4", + "dotenv": "^16.3.1", "express": "^4.18.2", "fetch": "^1.1.0", "got": "^13.0.0", @@ -778,6 +779,17 @@ "url": "https://github.com/fb55/domutils?sponsor=1" } }, + "node_modules/dotenv": { + "version": "16.3.1", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz", + "integrity": "sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/motdotla/dotenv?sponsor=1" + } + }, "node_modules/ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", @@ -2915,6 +2927,11 @@ "domhandler": "^5.0.3" } }, + "dotenv": { + "version": "16.3.1", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz", + "integrity": "sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==" + }, "ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", diff --git a/package.json b/package.json index 4d6d875..3ea67f4 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "license": "ISC", "dependencies": { "@mozilla/readability": "^0.4.4", + "dotenv": "^16.3.1", "express": "^4.18.2", "fetch": "^1.1.0", "got": "^13.0.0",