Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/explooosion/koa-deploy
template for koa2
https://github.com/explooosion/koa-deploy
ejs generator javascript koa koa2 nodejs template
Last synced: 10 days ago
JSON representation
template for koa2
- Host: GitHub
- URL: https://github.com/explooosion/koa-deploy
- Owner: explooosion
- License: mit
- Created: 2017-05-13T18:44:25.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-11-07T03:49:53.000Z (about 6 years ago)
- Last Synced: 2024-11-25T00:12:13.798Z (2 months ago)
- Topics: ejs, generator, javascript, koa, koa2, nodejs, template
- Language: JavaScript
- Size: 2.38 MB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# koa-deploy (for koa2)
[![Build Status](https://travis-ci.org/explooosion/koa-deploy.svg?branch=master)](https://travis-ci.org/explooosion/koa-deploy)
[![npm version](https://badge.fury.io/js/koa-deploy.svg)](https://badge.fury.io/js/koa-deploy)
[![license](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/explooosion/koa-deploy/blob/master/LICENSE)[Github - koa-deploy](https://github.com/explooosion/koa-deploy)
## Tech Stack
+ template for koa2
+ ES6/ES7 with Babel
+ ejs or jade(pug) template
+ mocha
+ gulp
+ pm2
## Koa Plugin+ koa-router
+ koa-views
+ koa-bodyparser
+ koa-compose
+ koa-logger
+ koa-mount
+ koa-static
+ koa-convert
## Getting Start```bash
npm install koa-deploy -g
``````bash
koa-deploy -i PROJECT-NAME
``````bash
cd PROJECT-NAME
``````bash
npm install
```## Run
### Production
Start with pm2.
```bash
npm start
```1. auto open in browser (option)
2. http://127.0.0.1/Stop the server.
```bash
npm run stop
```### Development
```bash
npm run dev
```## Directory
```
master
.
├── .babelrc
├── README.md
├── client
├── start.js
├── src
│ ├── middleware
│ ├── public
│ ├── routes
│ ├── view
│ └── app.js
├── package.json
└── test
└── test.spec.js```
### API example#### GET
[http://localhost/api/todo](http://localhost/api/todo)
#### POST, PUT, PATCH
[http://localhost/api/todo](http://localhost/api/todo)
```json
{
"id": "todo2",
"item": "Take care.",
"done": true
}
```#### DELETE
[http://localhost/api/todo](http://localhost/api/todo)
```json
{
"id": "todo2"
}
```## Feature
- [x] koa-deploy Cli
- [x] gulp task
- [x] mocha test## License
MIT