# koa-boilerplate-cli

> CLI for generating a new API project with KoaJs web framework

Latest version **0.1.1** (published 2024-05-21) · ISC license · 0 weekly downloads

## Install

```sh
npm install koa-boilerplate-cli
pnpm add koa-boilerplate-cli
yarn add koa-boilerplate-cli
bun add koa-boilerplate-cli
```

Provides the command `koa-boilerplate-cli`.

## 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.1.1 |
| Published | 2024-05-21 |
| First published | 2022-10-18 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 8 |
| Unpacked size | 177 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Quan Tran |
| Maintainers | quantran29 |
| Keywords | koa, sequelize, cli, project, generator, backend, nodejs, javascript, bootstrap |

## Links

- npm: https://www.npmjs.com/package/koa-boilerplate-cli
- Repository: https://github.com/quantran1229/koa-boilerplate-cli
- Homepage: https://github.com/quantran1229/koa-boilerplate-cli#readme
- Issues: https://github.com/quantran1229/koa-boilerplate-cli/issues
- npm.io page: https://npm.io/package/koa-boilerplate-cli

## Dependencies (8)

- [arg](https://npm.io/package/arg.md) ^5.0.2
- [del](https://npm.io/package/del.md) ^7.0.0
- [ncp](https://npm.io/package/ncp.md) ^2.0.0
- [execa](https://npm.io/package/execa.md) ^6.1.0
- [listr](https://npm.io/package/listr.md) ^0.14.3
- [inquirer](https://npm.io/package/inquirer.md) ^9.1.2
- [make-dir](https://npm.io/package/make-dir.md) ^3.1.0
- [pkg-install](https://npm.io/package/pkg-install.md) ^1.0.0

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 0.1.1 (latest) — 2024-05-21
- 0.1.0 — 2022-10-18

## README

# koa-boilerplate-cli

![koa](wiki/koa.png) ![koa](wiki/babel.png) ![koa](wiki/seq.png)

koa-boilerplate-cli is a cli toolkit to generate boilerplate code using KoaJS + Sequelize ORM from template for quick web development.

* Using [KoaJs](https://koajs.com/) framework 
* Using [Sequeilze](https://sequelize.org/) ORM.
* Using [Babel](https://babeljs.io/) to compile code.
* Adding ESLint, Dockerfile feature.
* Add example with User(with login)


## Installation

Run with npx

```bash
  npx koa-boilerplate-cli
```
## Usage

```javascript
npx create-ks-project <template: javascript> <name>

Options:
    '--yes', '-y': Skip promts,
    '--install', '-i': Automatically install dependencies,
```

## Example
### Quick setup
```bash
npx koa-boilerplate-cli javascript koa-sequelize -y
cd koa-sequelize
npm start
```
![quick-create](wiki/quick-create.png)

This will include use javascript + default version with all addons.
### Normal setup
```bash
npx koa-boilerplate-cli
```
![template](wiki/template.png)

Enter project name and template.

![version](wiki/version.png)

Choose your version. Currently there are 3 available versions:
* Minimize (Only routes and app setting up).
* Default (With full structure + ORM setting up).
* Default with example (Adding example of User login/create/list/delete).

![addon](wiki/addon.png)

Choose your addons. Currently only 3 addons: add git, add eslint and add docker build.

![install](wiki/install.png)

npm install afterward or not.

![done](wiki/done.png)

This will create folder `koa-sequelize` with all addons.
After that you can run app with:
```bash
cd koa-sequelize
npm start
```
## Current Tech Stack for template
```
"dependencies": {
    "@koa/cors": "^3.4.1",
    "dayjs": "^1.11.5",
    "dotenv": "^16.0.3",
    "glob": "^7.2.0",
    "koa": "^2.13.4",
    "koa-bodyparser": "^4.3.0",
    "koa-compose": "^4.1.0",
    "koa-helmet": "^6.1.0",
    "koa-morgan": "^1.0.1",
    "koa-router": "^12.0.0",
    "winston": "^3.8.2"
  },
  "devDependencies": {
    "nodemon": "^2.0.20",
    "@babel/node": "^7.19.1",
    "@babel/core": "^7.19.3",
    "@babel/plugin-transform-runtime": "^7.19.1",
    "@babel/preset-env": "^7.19.3",
    "@babel/cli": "7.19.3"
  }
```

## Future development
- Add typescript
- Add more ORM (TypeORM,...)

## Contributing

All contributions are accepted as a PR.

* You can file issues by submitting a PR.
* Implement new feature by submitting a PR.
* Improve documentation by submitting PR.
You are welcome to improve this project! It would help me so much!
## Support

For support, email downy1229@gmail.com!

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