Skip to content

feat: add ssl config to json configuration#179

Merged
josephinecr merged 2 commits into
mainfrom
feature/ssl-config
Jun 24, 2026
Merged

feat: add ssl config to json configuration#179
josephinecr merged 2 commits into
mainfrom
feature/ssl-config

Conversation

@josephinecr

Copy link
Copy Markdown
Contributor

What does this PR do?

This PR resolves issue #156 by allowing users to define their SSL configuration directly within the nanoforge.config.json file, removing the strict need to pass --cert and --key as CLI arguments every time.

Key changes:

  • Added an SslConfig block (enable, cert, key) to config.type.ts and config-defaults.ts.
  • Updated the resolveSSL method in start.action.ts to read from the JSON config if the CLI arguments are missing.
  • Kept CLI arguments as the priority (overriding JSON config if both are provided).
  • Added proper CLIError handling with suggestions if SSL is requested but certificates/keys are missing from both the CLI args and the JSON config.

Closes #156

How do you test this PR?

  1. Build the CLI (pnpm run build).
  2. Go to a NanoForge project directory.
  3. Add the following block to your nanoforge.config.json:
    "ssl": {
      "enable": true,
      "cert": "path/to/cert",
      "key": "path/to/key"
    }

@josephinecr josephinecr requested a review from Exeloo as a code owner June 24, 2026 06:32
@github-actions github-actions Bot added the command:start Related to start command label Jun 24, 2026
Comment thread src/action/actions/start.action.ts Outdated
@josephinecr josephinecr requested a review from MartinFillon June 24, 2026 06:57
@josephinecr josephinecr merged commit 10787fd into main Jun 24, 2026
3 checks passed
@josephinecr josephinecr deleted the feature/ssl-config branch June 24, 2026 08:14
@Exeloo Exeloo mentioned this pull request Jun 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

command:start Related to start command

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add ssl config to json config

2 participants