Skip to main content

clean-sample

Replace the Express+OIDC sample with a minimal Hello-World stub.

v2: detects the unmodified copier-add-service template (Express + express-session + openid-client) by content marker in app/server.js, then replaces app/server.js + app/package.json with a minimal Express app that exposes /health on PORT (or 3000). Engineer-owned scaffolding (Dockerfile, config.<env>.yaml, .pipelines/, README.md) is untouched. Idempotent — re-running on an already-minimal service exits 0. Refuses to overwrite a substantially modified app/server.js.

Category: Service lifecycle
Tags: cleanup express oidc minimal placeholder template

Usage

noclickops clean-sample <service>

Flags

FlagDescription
-h, --helpShow this help and exit.

Example

noclickops clean-sample frontend

Example output

noclickops clean-sample v1.7.6 — strip Express+OIDC sample from services/smk1/app/

==> Replacing the Express+OIDC sample in services/smk1/app/
ℹ rewrote services/smk1/app/server.js
ℹ rewrote services/smk1/app/package.json

✓ Done.
Kept (engineer-owned): Dockerfile, config.<env>.yaml, .pipelines/, README.md.
Next: add your real code in services/smk1/app, then deploy with 'noclickops deploy smk1 test'.

Auth

None.

Depends on

  • bash
  • git

Exit codes

CodeMeaning
0Sample stripped — replacements staged in git. Or already minimal.
1Service folder missing, not a v2-layout service, or app/server.js has been modified.

See also

Full --help output

Show full --help
noclickops v1.7.6 — clean-sample

Replace the Express+OIDC sample with a minimal Hello-World stub.

v2: detects the unmodified copier-add-service template (Express + express-session + openid-client) by content marker in app/server.js, then replaces app/server.js + app/package.json with a minimal Express app that exposes /health on PORT (or 3000). Engineer-owned scaffolding (Dockerfile, config.<env>.yaml, .pipelines/, README.md) is untouched. Idempotent — re-running on an already-minimal service exits 0. Refuses to overwrite a substantially modified app/server.js.

Category: service-lifecycle
Tags: cleanup express oidc minimal placeholder template

Usage:
noclickops clean-sample <service>

Flags:
-h, --help Show this help and exit.

Example:
noclickops clean-sample frontend

Example output:
noclickops clean-sample v1.7.6 — strip Express+OIDC sample from services/smk1/app/

==> Replacing the Express+OIDC sample in services/smk1/app/
ℹ rewrote services/smk1/app/server.js
ℹ rewrote services/smk1/app/package.json

✓ Done.
Kept (engineer-owned): Dockerfile, config.<env>.yaml, .pipelines/, README.md.
Next: add your real code in services/smk1/app, then deploy with 'noclickops deploy smk1 test'.

Auth:
None.

Depends on:
bash git

Exit codes:
0 Sample stripped — replacements staged in git. Or already minimal.
1 Service folder missing, not a v2-layout service, or app/server.js has been modified.

See also:
add-service deploy