Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

create-koa-app

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

create-koa-app - npm Package Compare versions

Comparing version
0.0.4
to
0.0.5
.npmignore

Sorry, the diff of this file is not supported yet

+13
let nodeVersion = parseFloat(process.version.substring(1))
if (nodeVersion >= 7.6) {
require('./app')
} else {
let register = require('babel-core/register');
register({
presets: ['stage-3']
});
require('./app');
}
+2
-1

@@ -18,3 +18,4 @@ #!/usr/bin/env node

`you can type 'cd ${appName} && npm install' to build your app.
then, you can type 'node app.js' to start your app for the first time.`
then, you can type 'node app.js' to start your app for the first time.
happy hacking ^.^`
)

@@ -21,0 +22,0 @@ }).catch(function (e) {

@@ -1,8 +0,8 @@

let koa = require('koa')
let Koa = require('Koa')
let cors = require('koa-cors')
let bodyparser = require('koa-bodyparser')
var path = require('path');
var path = require('path')
let autoRoutes = require('koa-auto-routes')
let app = koa()
let app = new Koa()

@@ -15,2 +15,2 @@ app

app.listen(9999)
app.listen(9999)

@@ -7,2 +7,7 @@ {

"dependencies": {
"babel-core": "^6.23.1",
"babel-polyfill": "^6.23.0",
"babel-preset-es2015-node6": "^0.4.0",
"babel-preset-stage-3": "^6.22.0",
"file-cmd": "0.0.4",
"koa": "^1.2.5",

@@ -16,6 +21,6 @@ "koa-auto-routes": "0.0.4",

"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"start": "node start.js"
},
"author": "",
"license": "ISC"
}
}
# koa-base-boilerplate
a koa boilerplate integrated with koa-router koa-cors koa-bodyparser koa-auto-routes
## explain
simple and flexible !
a koa boilerplate integrated with koa-router koa-cors koa-bodyparser koa-auto-routes babel
and happly, you can use async/await in your app like koa2, even though we use koa1.
This handy feature is owe to babel.
koa-base-boilerplate is simple and flexible !
## usage
first, install create-koa-app.
```shell
npm install create-koa-app -g
```
then, use create-koa-app create your koa app
```shell
create-koa-app [your app name]
```
then, build
```shell
cd [your app name] && npm i
```
then, run
```shell
npm start
```
let Router = require('koa-router')
let fileCmd = require('file-cmd')
let router = new Router()
router.get('/', function* (next) {
this.body = 'hello,koa'
yield next
router.get('/', async function (next) {
this.body = 'hello,my koa app !'
await next
})
module.exports = router
{
"name": "create-koa-app",
"version": "0.0.4",
"version": "0.0.5",
"description": "Create koa apps with koa-base-boilerplate",

@@ -12,2 +12,6 @@ "main": "index.js",

},
"repository": {
"type": "git",
"url": "git+https://github.com/flypie2/create-koa-app.git"
},
"author": "flypie2",

@@ -14,0 +18,0 @@ "license": "ISC",

# create-koa-app
> Create koa apps with [koa-base-boilerplate](https://github.com/flypie2/koa-base-boilerplate)
> Create koa apps with koa-base-boilerplate
## install
## explain
[koa-base-boilerplate](https://github.com/flypie2/koa-base-boilerplate) is a koa boilerplate integrated with koa-router koa-cors koa-bodyparser koa-auto-routes babel
and happly, you can use async/await in your app like koa2, even though we use koa1.
This handy feature is owe to babel.
koa-base-boilerplate is simple and flexible !
## usage
first, install
```shell
su #then input your root password
npm install create-koa-app -g
```
npm install create-koa-app -g
then, use create-koa-app create your koa app
```shell
create-koa-app [your app name]
```
## usage
then, build
```shell
create-koa-app [your app name]
cd [your app name] && npm i
```
then, you have your koa app based on [koa-base-boilerplate](https://github.com/flypie2/koa-base-boilerplate)
then, run
ok ^.^
```shell
npm start
```