From 10a38e75ec07d1a56aa0e4e68d1ff635c8577a61 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 21 Feb 2026 00:48:09 +0000 Subject: [PATCH 1/2] Initial plan From bdb869a31e3b5f2d0a07f70d79dfcb311563efd0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 21 Feb 2026 00:49:25 +0000 Subject: [PATCH 2/2] Add README.md explaining project files, installation, usage, and endpoints Co-authored-by: osortega <48293249+osortega@users.noreply.github.com> --- README.md | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..06d1619 --- /dev/null +++ b/README.md @@ -0,0 +1,63 @@ +# simple-server + +A minimal [Express.js](https://expressjs.com/) HTTP server that demonstrates basic routing, including a `GET` endpoint and a `PATCH` endpoint. + +--- + +## Installation + +```bash +npm install +``` + +--- + +## Usage + +Start the server (uses [nodemon](https://nodemon.io/) for auto-restart on file changes): + +```bash +npm start +``` + +The server listens on **port 7000** by default. + +--- + +## File Descriptions + +| File | Description | +|------|-------------| +| `index.js` | Main entry point. Creates the Express app, registers routes, and starts the server on port 7000. | +| `patchHandler.js` | Express router module that handles `PATCH /` requests. | +| `package.json` | Project metadata and dependency definitions (`express`, `nodemon`). | +| `test.txt` | A plain-text file containing numbers 1–20, used for testing file-serving or read operations. | + +--- + +## API Endpoints + +### `GET /` + +Returns a plain-text greeting. + +**Response:** +``` +Hello world! +``` + +### `PATCH /` + +Logs the incoming request. Handled by `patchHandler.js`. + +--- + +## Project Structure + +``` +simple-server/ +├── index.js # App entry point +├── patchHandler.js # PATCH route handler +├── package.json # Project configuration +└── test.txt # Sample text file (numbers 1–20) +```