{"id":22218574,"url":"https://github.com/megahertz/letssl","last_synced_at":"2025-03-25T07:22:54.660Z","repository":{"id":66074177,"uuid":"325405228","full_name":"megahertz/letssl","owner":"megahertz","description":"Simple way to retrieve SSL certificate using HTTP ACME challenge","archived":false,"fork":false,"pushed_at":"2020-12-30T09:08:43.000Z","size":6355,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-16T19:55:25.409Z","etag":null,"topics":["acme","certificate","https","let-s-encrypt","ssl"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/megahertz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-12-29T23:05:42.000Z","updated_at":"2024-03-17T01:49:47.000Z","dependencies_parsed_at":"2023-02-20T19:00:55.405Z","dependency_job_id":null,"html_url":"https://github.com/megahertz/letssl","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/megahertz%2Fletssl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/megahertz%2Fletssl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/megahertz%2Fletssl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/megahertz%2Fletssl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/megahertz","download_url":"https://codeload.github.com/megahertz/letssl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245415619,"owners_count":20611579,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["acme","certificate","https","let-s-encrypt","ssl"],"created_at":"2024-12-02T22:27:10.813Z","updated_at":"2025-03-25T07:22:54.637Z","avatar_url":"https://github.com/megahertz.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# letssl\n[![Tests](https://github.com/megahertz/letssl/workflows/Tests/badge.svg)](https://github.com/megahertz/letssl/actions?query=workflow%3ATests)\n[![npm version](https://img.shields.io/npm/v/letssl?color=brightgreen)](https://www.npmjs.com/package/letssl)\n\n## Description\n\nSimple way to retrieve SSL certificate using HTTP ACME challenge. By default,\n[Let's Encrypt Authority](https://letsencrypt.org/) is used.\n\n## Installation\n\nInstall with [npm](https://npmjs.org/package/letssl):\n\n    npm install --save letssl\n\n## Usage\n\n```js\nconst express = require('express');\nconst https = require('https');\nconst { getCertificate } = require('letssl');\n\nasync function startServer() {\n  const [key, cert] = await getCertificate({ commonName: 'example.com' });\n  \n  const app = express();\n  app.get('/', (req, res) =\u003e {\n    res.end('Using SSL');\n  });\n  \n  const server = https.createServer({ key, cert }, app).listen(443);\n}\n\nstartServer();\n\n```\n\n## Testing\n\nThere are three ways how certificate obtaining process could be tested.\n\n### Self-signed certificate\n\nWhen you don't need to test real domain you can set the `provider` option to\n`selfSigned`:\n\n```js\nconst [key, cert] = await getCertificate({\n  commonName: 'example.localhost',\n  provider: 'selfSigned',\n});\n```\n\n### Let's Encrypt staging\n\nWhen `debugLevel` is set and no `directoryUrl` provider,\nhttps://acme-staging-v02.api.letsencrypt.org/directory is used as `directoryUrl`\n\nconst [key, cert] = await getCertificate({\n  commonName: 'stage.example.com',\n  debugLevel: 1, // when \u003e 0 and no directoryUrl, \n});\n\n### Test ACME server\n\nIf you need to run tests frequently, you can use \n[Pebble](https://github.com/letsencrypt/pebble), a small ACME test server.\nSee [the e2e test](e2e/specs/built-in-http.spec.js) for example.\n\n## Credits\n\n - [acme-client](https://github.com/publishlab/node-acme-client) ACME client\n  used under the hood\n  \n - [node-simple-cert](https://github.com/chromakode/node-simple-cert) Similar\n library\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmegahertz%2Fletssl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmegahertz%2Fletssl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmegahertz%2Fletssl/lists"}