Skip to content

Fix broken bodyParser usage, add missing deps and .gitignore#15

Open
amanjagdev wants to merge 1 commit into
easebuzz:masterfrom
amanjagdev:fix/broken-bodyparser-and-missing-deps
Open

Fix broken bodyParser usage, add missing deps and .gitignore#15
amanjagdev wants to merge 1 commit into
easebuzz:masterfrom
amanjagdev:fix/broken-bodyparser-and-missing-deps

Conversation

@amanjagdev
Copy link
Copy Markdown

Summary

Fixes #14

  • Replace deprecated bodyParser() with bodyParser.json() + bodyParser.urlencoded() — the old form crashes on current body-parser/express versions, making the kit completely non-functional.
  • Add express, body-parser, and request to package.json — these were required in code but never declared as dependencies, so npm install on a clean clone fails.
  • Add .gitignore — excludes node_modules/, .env (contains secrets), and debug logs.
  • Clean up code formatting for consistency (quotes, semicolons, indentation).

Test plan

  • Clone the branch and run cd Easebuzz_NodeJS_kit && npm install && node main.js
  • Verify server starts on port 3000 without errors
  • Verify POST to /initiate_payment works with valid credentials

- Replace deprecated `bodyParser()` call with `bodyParser.json()` and
  `bodyParser.urlencoded({ extended: true })` — the old form crashes on
  current body-parser/express versions.
- Add `express`, `body-parser`, and `request` to package.json dependencies
  (they were used but never declared).
- Add .gitignore to exclude node_modules/, .env, and debug logs.
- Clean up code formatting for consistency.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NodeJS kit crashes on startup due to deprecated bodyParser() usage and missing dependencies

1 participant