From 543e18a99b39ec9536cacd48ed833d0f4274a35d Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Mon, 9 Mar 2026 10:06:41 -0700 Subject: [PATCH] Drop body-parser as external dependency This isn't needed as we can now just use the json() and urlencoded() functions that are directly built into express. --- lmno.js | 5 ++--- package.json | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/lmno.js b/lmno.js index cb94610..0f89f0f 100644 --- a/lmno.js +++ b/lmno.js @@ -1,6 +1,5 @@ const express = require("express"); const cors = require("cors"); -const body_parser = require("body-parser"); const session = require("express-session"); const bcrypt = require("bcrypt"); const fs = require("fs"); @@ -54,8 +53,8 @@ app.use(express.static(path.join(__dirname, '..', 'lmno.games'))); */ app.set('trust proxy', true); app.use(cors()); -app.use(body_parser.urlencoded({ extended: false })); -app.use(body_parser.json()); +app.use(express.urlencoded({ extended: false })); +app.use(express.json()); /* Ensure data directory exists before creating session store. */ if (!fs.existsSync(DATA_DIR)) { fs.mkdirSync(DATA_DIR); diff --git a/package.json b/package.json index fc1cdab..8649bc4 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,6 @@ "license": "ISC", "dependencies": { "bcrypt": "^4.0.1", - "body-parser": "^1.19.0", "cors": "^2.8.5", "express": "^4.17.1", "express-session": "^1.17.1", -- 2.45.2