Giter Club home page Giter Club logo

node-mongoose-mocha-demo's Introduction

node-mongoose-mocha-demo

学习使用nodejs\mongoose.js\mocha 的单元测试

##安装依赖 * npm install mongoose -g * npm install mocha -g * npm install chai -g //单元测试断言框架

##概述 ####连接数据库 db/database.js 是连接mongodb的文件,引入文件即执行连接数据库.

####创建Model model/user.js * 定义了user的描述文件, Schema描述了文本属性,可在此添加属性或者继承方法 * 通过Schema生成Model, Model是对应Schema的编译版本,但是Model具备操作数据库的能力

##有问题反馈 在使用中有任何问题,欢迎反馈给我,可以用以下联系方式跟我交流

##关于作者

  var jondai = {
    nickName  : "jondai",
    site : "http://jondai.cn"
  }

node-mongoose-mocha-demo's People

Contributors

jondai avatar

Watchers

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