Git Product home page Git Product logo

koa2-example's Introduction

koa2-example

准备

npm i -g coden
npm i -g typings

初始化

git clone https://github.com/17koa/koa2-example.git
cd koa2-example
npm i
typings install
npm start

实例

  1. 最简单的koa2.js
  2. koa2-example

Koa2-example说明

  "koa": "^2.0.0",
  "koa-bodyparser": "^2.0.1",
  "koa-convert": "^1.2.0",
  "koa-json": "^1.1.1",
  "koa-logger": "^1.3.0",
  "koa-onerror": "^1.2.1",
  "koa-router": "^7.0.0",
  "koa-static": "^1.5.2",
  "koa-views": "^5.0.1"

为了支持koa2,下面组件要注意和1.x不一样

  "koa": "^2.0.0",
  "koa-router": "^7.0.0",
  "koa-views": "^5.0.1"

语法提示

typings install node koa --ambient --save

强制提示

/// <reference path="typings/main/ambient/node/index.d.ts"/>
/// <reference path="typings/main/ambient/koa/index.d.ts"/>

调试

http://i5ting.github.io/vsc/#107

koa2-example's People

Contributors

i5ting avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.