No description
This repository has been archived on 2026-04-09. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
  • HTML 83.5%
  • JavaScript 16.5%
Find a file
mapiedra34 b5686a85f7
Some checks failed
Azure Static Web Apps CI/CD / Build and Deploy Job (push) Has been cancelled
Azure Static Web Apps CI/CD / Close Pull Request Job (push) Has been cancelled
Fix app location path in workflow
Remove leading slash from app_location path

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-02 12:04:09 -05:00
.github/workflows Fix app location path in workflow 2026-04-02 12:04:09 -05:00
.vscode updated bun 2026-02-18 10:55:31 -06:00
public updated 2026-03-27 09:20:27 -05:00
.gitignore updated 2026-03-27 09:20:27 -05:00
package-lock.json removed bun 2026-04-02 11:34:44 -05:00
package.json removed bun 2026-04-02 11:34:44 -05:00
README.md Migrate from Bun to Node.js with Azure PostgreSQL 2026-04-02 11:39:20 -05:00
server.js removed bun 2026-04-02 11:34:44 -05:00
server.log removed bun 2026-04-02 11:34:44 -05:00
staticwebapp.config.json Configure API proxy to App Service backend 2026-04-02 11:52:22 -05:00

Transfer Portal

Transfer Portal API server with Node.js/Express and Azure PostgreSQL.

Prerequisites

  • Node.js 18+
  • PostgreSQL database (Azure Database for PostgreSQL Flexible Server)

Environment Variables

Create a .env file:

PGHOST=<your-postgres-host>
PGPORT=5432
PGUSER=<your-username>
PGPASSWORD=<your-password>
PGDATABASE=transfer_portal
PORT=3000

Installation

npm install

Development

npm run dev

Server watches for file changes and auto-reloads.

Production

npm start

Database

The app automatically creates the requests table on startup. Connection uses SSL for Azure PostgreSQL.

API Endpoints

  • GET /api/requests?status=<received|in-review|approved|denied> - List requests
  • POST /api/requests - Create new request
  • PATCH /api/requests/:id/status - Update request status
  • DELETE /api/requests/denied - Delete all denied requests
  • DELETE /api/requests/approved/old - Delete approved requests older than 7 days

Frontend

Static UI is served from public/ folder. The app proxies API calls to backend endpoints.