# easycdn

> easycdn - aws cdk pattern to spawn AWS CloudFront

Latest version **0.1.0** (published 2021-05-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install easycdn
pnpm add easycdn
yarn add easycdn
bun add easycdn
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2021-05-22 |
| First published | 2021-05-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 7 |
| Unpacked size | 18.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | fog-fish |

## Links

- npm: https://www.npmjs.com/package/easycdn
- Repository: https://github.com/fogfish/easycdn
- Homepage: https://github.com/fogfish/easycdn#readme
- Issues: https://github.com/fogfish/easycdn/issues
- npm.io page: https://npm.io/package/easycdn

## Dependencies (7)

- [@types/node](https://npm.io/package/@types/node.md) 15.6.0
- [aws-cdk-pure](https://npm.io/package/aws-cdk-pure.md) ^1.3.19
- [@aws-cdk/core](https://npm.io/package/@aws-cdk/core.md) *
- [@aws-cdk/aws-s3](https://npm.io/package/@aws-cdk/aws-s3.md) *
- [@aws-cdk/aws-route53](https://npm.io/package/@aws-cdk/aws-route53.md) *
- [@aws-cdk/aws-cloudfront](https://npm.io/package/@aws-cdk/aws-cloudfront.md) *
- [@aws-cdk/aws-route53-targets](https://npm.io/package/@aws-cdk/aws-route53-targets.md) *

## Recent versions

- 0.1.0 (latest) — 2021-05-22

## README

# EasyCDN

EasyCDN is AWS CDK pattern that takes care about configuration of the infrastructure required to securely deliver content through AWS CloudFront. 

[![Build Status](https://github.com/fogfish/easycdn/workflows/build/badge.svg)](https://github.com/fogfish/easycdn/actions/)
[![Git Hub](https://img.shields.io/github/last-commit/fogfish/easycdn.svg)](https://github.com/fogfish/easycdn)
[![Coverage Status](https://coveralls.io/repos/github/fogfish/easycdn/badge.svg?branch=main)](https://coveralls.io/github/fogfish/scud?branch=main)
[![npm](https://img.shields.io/npm/v/easycdn)](https://www.npmjs.com/package/easycdn)


## Inspiration

AWS CloudFront is a convenient approach for static content distribution. Unfortunately, it requires a boilerplate AWS CDK code to bootstrap the provisioning of required resources. This library implements a high-order components on top of AWS CDK that simplify the deployment.

## Getting started

The latest version of the library is available at its `main` branch. All development, including new features and bug fixes, take place on the `main` branch using forking and pull requests as described in contribution guidelines.

```bash
npm install --save easycdn
```

### Example of usage

```js
import * as pure from 'aws-cdk-pure'
import * as easy from 'easycdn'

// creation of CDN requires definition of 
//  - site name
//  - tls certificate arn
const cdn = easy.CDN(
  'cdn.example.com',
  'arn:aws:acm:us-east-1:000000000000:certificate/xxxxxxxx-xx...xxxx',
)

//
// injects CDN to your stack and get reference to origin s3 bucket
const stack = new cdk.Stack(/* ... */)
const origin = pure.join(stack, cdn)
```

## HowTo Contribute

The project is [MIT](https://github.com/fogfish/easycdn/blob/master/LICENSE) licensed and accepts contributions via GitHub pull requests:

1. Fork it and clone 
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Added some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

```bash
git clone https://github.com/fogfish/easycdn
cd scud

npm install
npm run build
npm run test
npm run lint
```

## License

[![See LICENSE](https://img.shields.io/github/license/fogfish/easycdn.svg?style=for-the-badge)](LICENSE)

---
_Source: https://npm.io/package/easycdn · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
