Git Product home page Git Product logo

wxpet-server's Introduction

项目介绍

koa koa-router sequelize mysql2

Node.js + Koa2 开发服务端API接口

数据库

启动项目前一定要在创建好 wxapp 数据库。

# 登录数据库
$ mysql -uroot -p密码

# 创建 wxapp 数据库
$ CREATE DATABASE IF NOT EXISTS wxapp DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

项目使用

首先使克隆项目,然后进入项目根目录使用命令安装包,最后命令启动项目,代码会根据模型自动创建数据库表的。

# 克隆项目代码
$ git clone https://github.com/liangfengbo/nodejs-koa-wxapp.git

# 进入koa项目根目录
$ cd nodejs-koa-wxapp

# 安装包
$ npm install

# 运行服务
$ npm run dev

# 打开浏览器输入回车:http://localhost:4000

项目亮点

Koa服务端编程、异步编程、面向对象编程。

  • Koa 与 Koa 二次开发API
  • 多 koa-router 拆分路由
  • require-directory 自动路由加载
  • nodemon修改文件自动重启
  • 异步编程,async/await
  • 异步异常链与全局异常处理
  • Sequelize ORM 管理 MySQL
  • JWT 权限控制中间件
  • Validator 与 LinValidator 验证器
  • 更多介绍..

接口v1

wxpet-server's People

Contributors

tenderq 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.