# @azure-functions-contrib/lets-encrypt

> A set of Azure Functions for the Let's Encrypt Site Extension.

Latest version **0.1.5** (published 2018-08-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install @azure-functions-contrib/lets-encrypt
pnpm add @azure-functions-contrib/lets-encrypt
yarn add @azure-functions-contrib/lets-encrypt
bun add @azure-functions-contrib/lets-encrypt
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.5 |
| Published | 2018-08-26 |
| First published | 2018-08-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 7.2 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Jacob Marshall |
| Maintainers | jacobmarshall |

## Links

- npm: https://www.npmjs.com/package/@azure-functions-contrib/lets-encrypt
- Repository: https://github.com/azure-functions-contrib/lets-encrypt
- Homepage: https://github.com/azure-functions-contrib/lets-encrypt#readme
- Issues: https://github.com/azure-functions-contrib/lets-encrypt/issues
- npm.io page: https://npm.io/package/@azure-functions-contrib/lets-encrypt

## Dependencies (3)

- [request](https://npm.io/package/request.md) ^2.88.0
- [ms-rest-azure](https://npm.io/package/ms-rest-azure.md) ^2.5.7
- [azure-arm-website](https://npm.io/package/azure-arm-website.md) ^4.0.0

## Recent versions

- 0.1.5 (latest) — 2018-08-26
- 0.1.4 — 2018-08-26
- 0.1.3 — 2018-08-26
- 0.1.2 — 2018-08-26
- 0.1.1 — 2018-08-26
- 0.1.0 — 2018-08-26

## README

# @azure-functions-contrib/lets-encrypt

A set of Azure Functions for the Let's Encrypt Site Extension.

This project is still a work in progress, more documentation to come.

## Functions

Module | Description
--- | --- 
`@azure-functions-contrib/lets-encrypt/renew` | Renews any certificates that are near to their expiration date.
`@azure-functions-contrib/lets-encrypt/acme-challenge` | Serves the `.well-known/acme-challenge` folder.

## Example usage

### `@azure-functions-contrib/lets-encrypt/renew`

The following example is a cron that triggers the Let's Encrypt Site Extension to auto-renew any certificates that are near to expiring. This example runs every week (on Sunday), but can be configured to run whenever you like.

You can control when the certificates are renewed by setting the `letsencrypt:RenewXNumberOfDaysBeforeExpiration` app setting. The default is 22 days.

#### function.json

```json
{
  "bindings": [
    {
      "name": "timer",
      "type": "timerTrigger",
      "direction": "in",
      "schedule": "0 0 0 * * 0"
    }
  ],
  "disabled": false
}
```

#### index.js

```js
module.exports = require('@azure-functions-contrib/lets-encrypt/renew')();
```

### `@azure-functions-contrib/lets-encrypt/acme-challenge`

The following example serves the `.well-known/acme-challenge` folder. It does not require any configuration by default, but can be passed the absolute path to the `acme-challenge` folder.

#### function.json

```json
{
  "bindings": [
    {
      "authLevel": "anonymous",
      "name": "req",
      "type": "httpTrigger",
      "direction": "in",
      "methods": [
        "get"
      ],
      "route": ".well-known/acme-challenge/{*file}"
    },
    {
      "name": "res",
      "type": "http",
      "direction": "out"
    }
  ],
  "disabled": false
}
```

#### index.js

```js
module.exports = require('@azure-functions-contrib/lets-encrypt/acme-challenge')({
  acmeChallengePath: 'D:\\home\\site\\wwwroot\\.well-known\\acme-challenge', // optional
});
```

## License

MIT ❤️

---
_Source: https://npm.io/package/@azure-functions-contrib/lets-encrypt · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
