INS Landing Page

Single landing page for Infinity Networks Security with a lead form. Leads are stored in a SQLite file; there is no admin UI, leads are exported manually.

  • public/index.html: the page (content from infinitynetworks.com.my)
  • server.js: serves the page and POST /api/leads, Node 22 built-ins only, no npm dependencies

Run locally

Requires Node 22.13 or newer.

npm start          # http://localhost:3000, database at ./data/leads.db
npm test

Environment: PORT (default 3000), DB_PATH (default ./data/leads.db).

Docker

docker build -t ins-landing-page .
docker run -p 3000:3000 -v ins-leads:/data ins-landing-page

Deploying to Kubernetes

  • Mount a PersistentVolumeClaim at /data. Without it, leads are lost when the pod restarts.
  • Run exactly 1 replica (SQLite file, single writer). Use strategy: Recreate so two pods never hold the volume at once during a rollout.
  • The container runs as user node (uid 1000); set securityContext.fsGroup: 1000 so it can write to the volume.
  • Health check: GET / returns 200.

Exporting leads

To CSV, from the running pod:

kubectl exec deploy/ins-landing-page -- node --disable-warning=ExperimentalWarning -e "
const {DatabaseSync}=require('node:sqlite');
const rows=new DatabaseSync(process.env.DB_PATH,{readOnly:true}).prepare('SELECT * FROM leads ORDER BY id').all();
const q=v=>v==null?'':'\"'+String(v).replace(/^[=+\-@]/,\"'\$&\").replace(/\"/g,'\"\"')+'\"';
if(rows.length)console.log(Object.keys(rows[0]).join(','));
for(const r of rows)console.log(Object.values(r).map(q).join(','));
" > leads.csv

Or copy the whole database file: kubectl cp <pod>:/data/leads.db ./leads.db.

Columns: id, created_at (UTC), name, email, phone, company, industry, message, referrer, utm_source, utm_medium, utm_campaign.

Leads contain personal data (PDPA). Keep exported files out of shared drives and delete them when done.

S
Description
No description provided
Readme
471 KiB
0 Stars 1 Watchers 0 Forks
Languages
HTML 64.1%
JavaScript 25.7%
Shell 9.3%
Dockerfile 0.9%