This file contains hidden or 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
import express from "express"; | |
import fs from "fs/promises"; | |
import path from "path"; | |
import markdownIt from "markdown-it"; | |
import fm from "front-matter"; | |
import cookieParser from "cookie-parser"; | |
import morgan from "morgan"; | |
const app = express(); | |
const port = process.env.PORT || 3000; |
This file contains hidden or 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
import express from "express"; | |
import path from "path"; | |
import cors from "cors"; | |
import helmet from "helmet"; | |
import morgan from "morgan"; | |
import taskController from "./controllers/taskController.js"; | |
import errorController from "./controllers/errorController.js"; | |
// const __dirname = path.dirname(new URL(import.meta.url).pathname); | |
import { fileURLToPath } from "url"; |