Terminal
Terminal/Skill
Helps set up, adapt and fix Node.js apps for GoDaddy's Node.js Hosting, including package.json, PORT binding and deploy failures.
By GoDaddy
Works with
npx skills add godaddy/nodejs-hosting-agent-skill --skill godaddy-nodejs-hostingHelp users build or fix Node.js apps for GoDaddy Node.js Hosting (upload → install → run build → run start). Package manager: npm, pnpm, or yarn (lockfile determines platform choice).
Rules: contract.md. Recipes: examples.md. Errors: troubleshooting.md. Email: email.md. Validator: scripts/validate-paas.mjs.
| User intent | Section |
|---|---|
| New app / scaffold / greenfield | New app workflow |
| Existing repo / deploy failed / make this work on hosting | Adapting an existing app |
| AI export (Lovable, Replit, Bolt, etc.) | Adapting an existing app + AI export quick fixes |
| Uses MySQL / database on platform | Managed MySQL |
| Sends email / contact form / notifications |
Non-technical user (no jargon, “I built this in Lovable”, “how do I upload”):
output: 'export', use nextjs-static-export instead — explain: "Your app builds to static files. We add a small server so GoDaddy can run it — your site stays the same."Technical user - existing app: follow Adapting an existing app; use the matching framework recipe for start/build only; do not re-explaining basics.
Technical user - new app: follow New app workflow; use the matching framework recipe from Framework detection.
package.json with name, version, main (file exists), scripts.build, and scripts.startbuild may be "echo build" when nothing compiles; frameworks need real build commands (examples.md)process.env.PORT; use 0.0.0.0 when the framework needs a hostdependencies; do not upload node_modulesprocess.env; no .env in zip; zip under 100 MBDB_* env + mysql2 if using a database (contract.md)http://127.0.0.1:2525/api/email/send) using the vended sendEmail() helper; no nodemailer, no external SMTP (email.md)The platform supports Git repository sync and zip upload in the Node.js Hosting UI. See AGENTS.md Deployment Flow for agent context.
.git, lockfiles, or export origin (a zip export may include .git from local development).Optional platform MySQL injects DB_HOST, DB_PORT, DB_NAME, DB_USER, DB_PASSWORD. The app must read each from process.env (not hard-coded). Use mysql2 in dependencies and parameterized queries.
Recipe: examples.md#managed-mysql. Validator: E009, E010 when a DB client or Prisma MySQL provider is detected.
Apps send transactional email (contact forms, notifications, receipts, password resets) through the platform's built-in gateway at http://127.0.0.1:2525/api/email/send — loopback-only, inside every container. No SMTP config, no nodemailer, no third-party API keys; outbound SMTP is not routable from the container.
Copy the sendEmail() helper into src/server/email.ts and call it from route handlers. All email code calls the helper — never POST to the gateway directly, never import nodemailer.
Load-bearing rules (full detail: email.md):
from by default — the gateway picks the app's canonical sender. Set from only as a hardcoded literal on a verified domain (unverified → 400); never from user input.process.env (e.g. CONTACT_FORM_RECIPIENT_EMAIL), set in the Node.js Hosting UI — never hardcode, never TODO-placeholder. Fail closed when unset. Per-user recipients plumb through from app data, not anonymous request bodies.Recipe and helper: email.md. Contract rule: C13. Migrating existing nodemailer code: email.md#migrating-from-nodemailer.
Use this path when the user already has a project (local repo, zip export, or app that failed on Node.js Hosting). Goal: hosting compatibility only — not new features, refactors, or framework changes.
package.json (name, version, main, build, start), listen/bind lines, and a static server file when missing — not rewriting app logic.main, scripts.start, and scripts.build with examples.md for that stack only.Audit against contract.md (nine platform requirements: package.json fields, build/start, PORT, deps, env vars, Vite, zip size, network, MySQL). For each item: check compliance, apply the smallest fix, preserve all existing behaviour.
Copy and track progress:
- [ ] Run validator on project root (baseline)
- [ ] Map each error/warning to contract rule (see table below)
- [ ] Apply minimal fix per ID; use framework recipe for script names only
- [ ] Re-run validator until exit 0 (or document warnings if not --strict)
- [ ] install → build → start locally (match lockfile package manager)
- [ ] Pre-upload checklist complete
Validator (required before done):
node scripts/validate-paas.mjs /path/to/project
Run from this skill directory (e.g. after npx skills add or symlink to ~/.cursor/skills/godaddy-nodejs-hosting). From a clone of nodejs-hosting-agent-skill: npm run validate -- /path/to/project.
Symptom detail: troubleshooting.md.
| ID | Typical minimal fix |
|---|---|
| E001 | Add root package.json |
| E002 | Add or fix scripts.start per recipe |
| E003 | Fix start entry path or add missing file |
| E004 | Use process.env.PORT; remove hardcoded listen(N) |
| E005 | Add scripts.build (echo build or framework recipe) |
| E006 | Move runtime packages to dependencies |
| E007 | Add name and version to package.json |
| E008 | Add main pointing at an existing entry file |
| W001 | Remove .env from upload; use hosting UI for env vars |
| W002 | Optional: add engines.node |
| W004 | Exclude node_modules from deployment (zip or Git) |
| E009 | Add mysql2 to dependencies |
| E010 | Read each DB_* from process.env (see managed-mysql) |
| C14 | Create .npmrc with registry=https://registry.npmjs.org/. If the lockfile has non-public URLs, delete it and reinstall |
Special cases
package.json before adapting; do not restructure packages in place unless the user asks.next.config.* for output: 'export' before applying the standard Next recipe. Use nextjs-static-export (next build + Express serving the export dir), not next start. Match distDir in config (default out/). Same hosting pattern as Vite/Lovable static apps, but build is next build.PORT, start/build, dependencies, and lockfile.For Replit, Lovable, and Bolt patterns, see AI export quick fixes after applying this workflow.
Adaptation is complete under the same done criteria as a new app (validator 0, checklist, ready to update in Node.js Hosting).
Copy and track progress:
- [ ] Detect framework (package.json)
- [ ] Apply recipe from examples.md
- [ ] Add `.npmrc` with `registry=https://registry.npmjs.org/` to project root
- [ ] install && run build (if exists) && run start (npm, pnpm, or yarn — match user's lockfile)
- [ ] node scripts/validate-paas.mjs <project-dir>
- [ ] Pre-upload checklist complete
Run the validator as in Adapting an existing app.
Signal in package.json | Recipe |
|---|---|
next in dependencies (standard) | examples.md#nextjs — check next.config.* first |
output: 'export' in next.config.* | examples.md#nextjs-static-export |
nuxt in dependencies | examples.md#nuxtjs |
@remix-run/node or remix | examples.md#remix |
@nestjs/core | examples.md#nestjs |
fastify | examples.md#fastify |
vite (SPA) | examples.md#vite-react-vue-spa |
react-scripts | examples.md#create-react-app |
express, koa, hono or plain node server | examples.md#express-koa-hono |
| Frontend-only / unknown export | examples.md#vite-react-vue-spa (static server) |
Do not invent start commands for known frameworks; use the recipe exactly.
| Source | Fix |
|---|---|
| Replit | Remove .replit, replit.nix; ensure root start script |
| Lovable / Bolt | Add Express static server for dist/ or build/; add express to dependencies |
| Next.js static export | output: 'export' in config: keep next build; add Express serving export dir from distDir (default out/) (nextjs-static-export) — not the Vite/Lovable recipe |
Missing package.json | Create with start; run install (npm/pnpm/yarn) to generate lockfile |
| Hardcoded port | Use process.env.PORT || 3000 |
| Wrong deps section | Move runtime packages to dependencies |
For Lovable/Bolt static hosting, use the vite-react-vue-spa recipe.
package.json: name, version, main, build, startdependencies; do not deploy node_modules (exclude from zip or Git)process.env.PORT for listening; secrets via process.env.npmrc at project root with registry=https://registry.npmjs.org/. Lockfile URLs must be public npm (regenerate lockfile if not).envDB_* + mysql2 if applicableTask is complete only when:
validate-paas.mjs exits 0 on the project directory.