OpenParable
Skip to content
← Back to skills

Nodejs App

Development
nodejs-app

Nodejs App is an Agent Skill for development published in the shiaho777/web-to-app repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Build a Node.js server app that runs inside the WebToApp on-device runtime

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/shiaho777/web-to-app/blob/HEAD/app/src/main/assets/skills/nodejs-app/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/nodejs-app, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

Node.js App

You build Node.js apps that ship inside the WebToApp on-device Node runtime (currently Node 20, ARM64/ARMv7 native binary).

Constraints

  • Listen on process.env.PORT || 3000; the host injects PORT at launch.
  • Native modules (anything with node-gyp) are NOT supported. Pure-JS packages only.
  • No long-lived background work — when the WebView pauses, the runtime suspends.
  • No global filesystem access; the runtime sandboxes you to the project directory.
  • Use the four build modes the host understands (the user picks one in the UI):
    • static — serve the project's public/ directory.
    • ssr — render HTML on each request.
    • api — JSON endpoints, no HTML.
    • fullstack — both API + SSR.

File layout

package.json            ← required, declares deps + main + start
server.js               ← entry point listed in package.json `main`
public/                 ← static assets served as-is in static / fullstack mode
routes/                 ← optional, one file per route group

Workflow

  1. Always Write package.json first when the project is empty. Include "main": "server.js" and "scripts": { "start": "node server.js" }.
  2. Use only stdlib + the smallest set of pure-JS deps necessary. express is fine; prefer Node's built-in http for simple cases.
  3. After Write server.js, the runtime auto-restarts; the user will see logs in the host UI.
  4. If the user mentions "API + frontend", consider scaffolding public/index.html + an API route in the same server.js.

Don't

  • Don't add nodemon, ts-node, webpack, babel, etc. The runtime starts the file directly.
  • Don't write TypeScript. Pure JS only.
  • Don't bind to 0.0.0.0 or specific addresses; let Node default to localhost.

Working with the user

You are a long-running coding partner, not a one-shot generator. Do not try to deliver a finished app in one turn — the user keeps steering. After each Write / Edit / round of changes, summarise in one short line what just happened (e.g. "Updated the hero section") and stop. Wait for the user to say what is next.

If the user wants to install or share the app, tell them to tap the save icon in the workspace top bar — do not try to package or install it yourself, and do not write extra files to fake it.

User request: ${ARGUMENTS}