# razzle-examples-with-koa

> ## How to use

Latest version **3.0.0** (published 2019-04-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install razzle-examples-with-koa
pnpm add razzle-examples-with-koa
yarn add razzle-examples-with-koa
bun add razzle-examples-with-koa
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.0.0 |
| Published | 2019-04-16 |
| First published | 2018-04-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 7 |
| Unpacked size | 42.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | jaredpalmer |

## Links

- npm: https://www.npmjs.com/package/razzle-examples-with-koa
- npm.io page: https://npm.io/package/razzle-examples-with-koa

## Dependencies (7)

- [koa](https://npm.io/package/koa.md) ^2.5.3
- [react](https://npm.io/package/react.md) ^16.5.2
- [react-dom](https://npm.io/package/react-dom.md) ^16.5.2
- [koa-helmet](https://npm.io/package/koa-helmet.md) ^4.0.0
- [koa-router](https://npm.io/package/koa-router.md) ^7.4.0
- [koa-static](https://npm.io/package/koa-static.md) ^5.0.0
- [react-router-dom](https://npm.io/package/react-router-dom.md) ^4.3.1

## Recent versions

- 3.0.0 (latest) — 2019-04-16
- 3.0.0-alpha.2 (next) — 2019-01-07
- 3.0.0-alpha.1 — 2019-01-03
- 2.4.1 — 2019-01-03
- 3.0.0-alpha.0 — 2018-11-14
- 2.4.0 — 2018-07-30
- 2.0.0 — 2018-05-30
- 2.0.0-alpha.12 — 2018-04-23
- 2.0.0-alpha.11 — 2018-04-23
- 2.0.0-alpha.10 — 2018-04-23
- 2.0.0-alpha.9 — 2018-04-10
- 2.0.0-y.0 — 2018-04-10
- 2.0.0-alpha.8 — 2018-04-09

## README

# Using Razzle and Koa

## How to use

- Download the example [or clone the whole project][razzle-repo]:

```sh
curl https://codeload.github.com/jaredpalmer/razzle/tar.gz/master | tar -xz --strip=2 razzle-master/examples/with-koa
cd with-koa
```

- Install it and run:

```sh
yarn install
yarn start
```

## Idea behind the example

This is an example of how to use [Koa][koa], a popular web application framework, with a Razzle project, as an alternative to the default [Express][express] `server.js` setup.

Being minimalistic in its philosophy, [Koa][koa] doesn't include most required dependencies to mimic its [Express][express] counterpart, so this example relies on some additional packages.

- `koa-static` ([docs][koa-static])

Static file serving middleware. Used to serve resources under `process.env.RAZZLE_PUBLIC_DIR`.

- `koa-router` ([docs][koa-router])

Express-styling router middleware for [Koa][koa]. Will direct `HTTP GET` requests to your React client.

- `koa-helmet` ([docs][koa-helmet])

Provides important security headers to make your app more secure by default. Among other things, it prevents the `X-Powered-By` header from [being sent to requesting clients][hide-powered-by].

---

For additional information, refer to [Koa offical documentation][koa-docs].

[razzle-repo]: https://github.com/jaredpalmer/razzle.git
[koa]: http://koajs.com
[express]: https://expressjs.com/
[koa-static]: https://github.com/koajs/static
[koa-router]: https://github.com/alexmingoia/koa-router
[koa-helmet]: https://github.com/venables/koa-helmet
[hide-powered-by]: https://helmetjs.github.io/docs/hide-powered-by/
[koa-docs]: https://github.com/koajs/koa/tree/master/docs

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