create-neon-app-script
v0.0.1
Published
A TypeScript-based CLI to bootstrap a project by cloning a repository and generating a `.env` file via flags or interactive prompts.
Readme
create-neon-backend
A TypeScript-based CLI to bootstrap a project by cloning a repository and generating a .env file via flags or interactive prompts.
Install / Usage
Run directly with npx after publishing:
npx create-neon-backend my-app --template react --express --database-url postgres://user:pass@host/db -e API_KEY=secretOr locally (dev):
npm run build
node bin/create --helpOptions
project-directory(optional): Target directory. Defaults tomy-appin interactive mode.-t, --template <name>: Template to use (reactornextjs).--database-url <url>: Database connection string for running initial migration (NOT saved to.env).-e, --env <KEY=VALUE...>: Provide multiple environment variables.--express: Pre-fill common Express variables (PORT,NODE_ENV,SESSION_SECRET).-y, --yes: Non-interactive, accept defaults (requires--templateand--database-urlunless--env-only).--env-only: Only create.envin the directory.
What it does
- Collects options and prompts (including
DATABASE_URL, which is runtime-only). - Clones the selected template from
luist18/neon-backend-examples/<template>. - Generates
.env(excludingDATABASE_URL). - If
db/initial-migration.sqlexists and--database-urlwas provided, runs it using@neondatabase/serverless.
Development
- Build:
npm run build - Dev help:
npm run dev
Publish
Update version, then:
npm publish --access publicTemplates are sourced from https://github.com/luist18/neon-backend-examples (subdirectory clone).
