From 8d007514a6616b3c045096a6de950b21e5e849fb Mon Sep 17 00:00:00 2001 From: Abhay <80220229+EpicGamer007@users.noreply.github.com> Date: Thu, 23 Feb 2023 20:58:23 +0000 Subject: [PATCH] Fix for last PR (#21) * add module type to package.json * revert to commonjs format * remove index.mjs * remove unneeded import --- index.mjs => index.js | 9 ++++----- package.json | 6 +++--- 2 files changed, 7 insertions(+), 8 deletions(-) rename index.mjs => index.js (84%) diff --git a/index.mjs b/index.js similarity index 84% rename from index.mjs rename to index.js index 493cee4..b38166b 100644 --- a/index.mjs +++ b/index.js @@ -1,11 +1,10 @@ -import express from "express"; +const express = require("express"); const app = express(); -import { join, dirname } from "path"; -const __dirname = dirname(new URL(import.meta.url).pathname); +const { join } = require("path"); -import compression from "compression"; -import expressEJSLayouts from "express-ejs-layouts"; +const compression = require("compression"); +const expressEJSLayouts = require("express-ejs-layouts"); app.disable('x-powered-by'); diff --git a/package.json b/package.json index aa82cb1..c12bb48 100644 --- a/package.json +++ b/package.json @@ -2,10 +2,10 @@ "name": "hyprland-website", "version": "1.1.0", "description": "Website for Hyprland - Hyprland - A wayland compositor that doesn't sacrifice on its looks!", - "main": "index.mjs", + "main": "index.js", "scripts": { - "start": "NODE_ENV=production node index.mjs", - "dev": "nodemon index.mjs" + "start": "NODE_ENV=production node index.js", + "dev": "nodemon index.js" }, "keywords": [ "hyprland"