# @blended/starter

> example rest API

Latest version **1.0.0** (published 2017-05-05) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @blended/starter
pnpm add @blended/starter
yarn add @blended/starter
bun add @blended/starter
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2017-05-05 |
| First published | 2017-05-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 20 |
| Known vulnerabilities | 0 (+11 in 2 direct dependencies) |
| Install scripts | yes |
| Maintainers | blended-eng |

## Links

- npm: https://www.npmjs.com/package/@blended/starter
- Repository: https://github.com/Blended/starter
- Homepage: https://github.com/Blended/starter#readme
- Issues: https://github.com/Blended/starter/issues
- npm.io page: https://npm.io/package/@blended/starter

## Dependencies (20)

- [mz](https://npm.io/package/mz.md) ^2.6.0
- [koa](https://npm.io/package/koa.md) ^2.2.0
- [debug](https://npm.io/package/debug.md) ^2.6.6
- [husky](https://npm.io/package/husky.md) ^0.13.3
- [kcors](https://npm.io/package/kcors.md) ^1.3.2
- [sinon](https://npm.io/package/sinon.md) ^2.1.0
- [lodash](https://npm.io/package/lodash.md) ^4.17.4
- [koa-jwt](https://npm.io/package/koa-jwt.md) ^3.2.1
- [sqlite3](https://npm.io/package/sqlite3.md) ^3.1.8
- [standard](https://npm.io/package/standard.md) ^10.0.2
- [pluralize](https://npm.io/package/pluralize.md) ^4.0.0
- [sequelize](https://npm.io/package/sequelize.md) ^3.30.4
- [koa-helmet](https://npm.io/package/koa-helmet.md) ^3.1.0
- [koa-logger](https://npm.io/package/koa-logger.md) ^2.0.1
- [koa-router](https://npm.io/package/koa-router.md) ^7.1.1
- [jsonwebtoken](https://npm.io/package/jsonwebtoken.md) ^7.4.0
- [babel-polyfill](https://npm.io/package/babel-polyfill.md) ^6.23.0
- [koa-bodyparser](https://npm.io/package/koa-bodyparser.md) ^4.2.0
- [koa2-swagger-ui](https://npm.io/package/koa2-swagger-ui.md) ^2.3.0
- [babel-preset-node7](https://npm.io/package/babel-preset-node7.md) ^1.5.0

## Recent versions

- 1.0.0 (latest) — 2017-05-05

## README

[![Build Status](https://travis-ci.org/blended/starter.svg?branch=master)](https://travis-ci.org/blended/starter)

starter
=======

A rest API framework on top of koa

### Getting started

```sh
$ npm install starter --save
```

Then setup your application as follows:

```javascript
// app.js
import starter from 'starter'
import models from './api/models'
import env from './config/env'

let app = starter(env)

export default app

if (require.main === module) {
  let port = process.argv[2]
  models(env.db).then(db => {
    app.db = db
    app.run(port)
  })
}
```

and run it with `node app.js [port]`. If no port is set the app will run on port 3000.

### Developing

```sh
$ yarn install
```

### Test

```sh
$ yarn test
```

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