Skip to content

Support a positional app name (npx servergen my-api)#39

Merged
theinfosecguy merged 4 commits into
mainfrom
feat/positional-app-name
Jun 14, 2026
Merged

Support a positional app name (npx servergen my-api)#39
theinfosecguy merged 4 commits into
mainfrom
feat/positional-app-name

Conversation

@theinfosecguy

Copy link
Copy Markdown
Owner

Problem & Solution Overview

Adds a positional app name so npx servergen my-api works, while keeping -n, --name for backward compatibility. If both are given with different values it errors clearly; if neither is given it errors clearly. Framework defaults to express, port to 3000. --view and --db are now both rejected with the node framework. --help gains usage examples (basic, Node, view, database, custom-port, skip-install).

Testing Done

npm test: 223 passing, including new integration tests for positional naming, legacy --name, name sanitization, conflicting names, missing name, invalid combinations (node+view, node+db, invalid framework/view/port), and every supported flag (-f, -v ejs/pug/hbs, --db, -p, --skip-install, --debug). npm run test:coverage passes — coverage is now scoped to the importable library (the CLI entry point is exercised by the integration subprocess tests, which in-process istanbul can't measure).

@theinfosecguy theinfosecguy merged commit 168f140 into main Jun 14, 2026
5 checks passed
@theinfosecguy theinfosecguy deleted the feat/positional-app-name branch June 14, 2026 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant