# statick

> put a static app in the cloud

Latest version **0.2.2** (published 2017-11-14) · MIT license · 0 weekly downloads

## Install

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

Provides the command `statick`.

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.2 |
| Published | 2017-11-14 |
| First published | 2017-10-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 9 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Doruk Kutlu |
| Maintainers | doruk |
| Keywords | static, cloud, host, aws, s3, azure |

## Links

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

## Dependencies (9)

- [ora](https://npm.io/package/ora.md) ^1.3.0
- [chalk](https://npm.io/package/chalk.md) ^2.1.0
- [yargs](https://npm.io/package/yargs.md) ^9.0.1
- [aws-sdk](https://npm.io/package/aws-sdk.md) ^2.126.0
- [js-yaml](https://npm.io/package/js-yaml.md) ^3.10.0
- [bluebird](https://npm.io/package/bluebird.md) ^3.5.1
- [mime-types](https://npm.io/package/mime-types.md) ^2.1.17
- [babel-runtime](https://npm.io/package/babel-runtime.md) ^6.26.0
- [recursive-readdir](https://npm.io/package/recursive-readdir.md) ^2.2.1

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 0.2.2 (latest) — 2017-11-14
- 0.2.1 — 2017-11-14
- 0.1.2 — 2017-10-10
- 0.1.1 — 2017-10-10
- 0.1.0 — 2017-10-10
- 0.0.6 — 2017-10-08
- 0.0.5 — 2017-10-08

## README

## WIP

This is a Node.js module that takes a folder containing your static app, and hosts it in the selected provider's cloud. Currently only works with ``` provider: aws```, and hosts from an S3 bucket endpoint.

Compatible with any version since LTS:Boron (v6.9.0)

Roadmap:
- AWS: Attach S3 endpoint to a cloudfront distribution
- AWS: Associate a Route53 hosted zone with (bucket|distribution)
- Azure

---

**CLI**
```sh
# currently only accepts a config.yml (or .json) file
>> statick -c config.yml
```
**or node API**
```js
import statick from "statick"
import config from "statick.json"

statick(config);
```

### config.yml

```yml
provider: aws
domain: statick.io
path: ./public
exclude:
  - deleteme.html

aws:
  region: eu-west-1
  s3:
    IndexDocument: myIndex.html
```

### options

| key  | description  | default  | type |
|---|---|--:|--:|
| provider* | one of; "aws" | -| string |
| domain* | name of the uploaded-to storage | -| string |
| path*   | path of the folder the static app resides in  | - | string |
| aws.region  | *global* region of the AWS clients | "us-east-1" | string |
| aws.credentials  | of the shape { accessKeyId, secretAccessKey } |  - | object |
| aws.s3.IndexDocument | entry .html to your bucket (basename) | "index.html"| string |
| aws.s3.ErrorDocument | .html to redirect to (basename) | IndexDocument | string |
| exclude | RegExp patterns to test against each file (put quotes if using yml)  |   -| array |

\* required

#### Notes

- Constraints on S3 bucket name

  - The bucket name must be between 3 and 63 characters long (inclusive).
  - The bucket name must contain only lowercase characters, numbers, periods, underscores, and dashes. periods, underscores, and dashes.
  - The bucket name must not contain adjacent periods.

- *Conflicting conditional operation in progress* error indicates the S3 bucket name is currently unavailable. Trying again in a couple minutes works.

#### Reading

* [Managing Access Keys for Your AWS Account](http://docs.aws.amazon.com/general/latest/gr/managing-aws-access-keys.html)

* [Best Practices for Managing AWS Access Keys](http://docs.aws.amazon.com/general/latest/gr/aws-access-keys-best-practices.html)

* [Domains That You Can Register with Route 53](http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/registrar-tld-list.html)

* [Using CloudFront with Amazon S3](http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/MigrateS3ToCloudFront.html)

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