ThinkJS 2.0 中文文档
testing � prodution 3 ��������������������� ���������������������������������� ThinkJS �� mysql � mongodb � sqlite �������������������������� ���� SQL ���������� SQL ������������������������� ThinkJS mobile phone number', validate_mongoId: '{name} need is a valid hex-encoded representation of a MongoDB ObjectId', validate_multibyte: '{name} need contains one or more multibyte chars', validate_url: JavaScript ����������������������������������������������� �������������� ���������� Mysql � MongoDB � SQLite � ������������ thinkjs model [name] ������ ����������� src/common/model/user.js � �������������0 码力 | 238 页 | 1.87 MB | 1 年前3ThinkJS 2.1 Documentation
different requests. You can also custom and extend them in your projects. ThinkJS supports MySQL , MongoDB and SQLite . It encapsulates many APIs of the database operations, without having to manually stitching mobile phone number', validate_mongoId: '{name} need is a valid hex-encoded representation of a MongoDB ObjectId', validate_multibyte: '{name} need contains one or more multibyte chars', validate_url: database manipulation. A model maps to a data table in database. ThinkJS currently supports MySQL, MongoDB and SQLite. You can use command thinkjs model [name] in project directory to create model: This0 码力 | 148 页 | 1.69 MB | 1 年前3ThinkJS 2.0 Documentation
different requests. You can also custom and extend them in your projects. ThinkJS supports MySQL , MongoDB and SQLite . It encapsulates many APIs of the database operations, without having to manually stitching mobile phone number', validate_mongoId: '{name} need is a valid hex-encoded representation of a MongoDB ObjectId', validate_multibyte: '{name} need contains one or more multibyte chars', validate_url: database manipulation. A model maps to a data table in database. ThinkJS currently supports MySQL, MongoDB and SQLite. You can use command thinkjs model [name] in project directory to create model: This0 码力 | 141 页 | 1.61 MB | 1 年前3ThinkJS 2.2 Documentation
different requests. You can also custom and extend them in your projects. ThinkJS supports MySQL , MongoDB and SQLite . It encapsulates many APIs of the database operations, without having to manually stitching mobile phone number', validate_mongoId: '{name} need is a valid hex-encoded representation of a MongoDB ObjectId', validate_multibyte: '{name} need contains one or more multibyte chars', validate_url: database manipulation. A model maps to a data table in database. ThinkJS currently supports MySQL, MongoDB and SQLite. You can use command thinkjs model [name] in project directory to create model: thinkjs0 码力 | 156 页 | 2.62 MB | 1 年前3ThinkJS 2.2 中文文档
prodution 3 种项目环境,可以在不同的项目环境下进行 不同的配置,满足在不同环境下的配置需求,同时还可以基于项目需要进行扩展。 支持丰富的数据库 ThinkJS 支持 mysql , mongodb , sqlite 等常见的数据库,并且封装了很多操作数据库的接口, 无需手动拼接 SQL 语句,还可以自动防止 SQL 注入等安全漏洞。同时支持事务、关联模型等高级 功能。 代码自动更新 } } 模型介绍 项目开发中,经常要操作数据库,如:增删改查等操作。模型就是为了方便操作数据库进行的封 装,一个模型对应数据库中的一个数据表。 目前支持的数据库有: MySQL , MongoDB , PostgreSQL 和 SQLite 。 创建模型 可以在项目目录下通过命令 thinkjs model [name] 来创建模型: thinkjs model user; 执行完成后,会创建文件 model home/user 注 :模型文件不是必须存在,如果没有自定义方法可以不创建模型文件,实例化时会取模型基类 的实例。 模型属性 model.pk 主键 key,默认为 id 。MongoDB 下为 _id 。 model.schema 数据表字段定义,默认会从数据库中读取,读到的信息类似如下: 模型 { id: { name: 'id', type: 'int'0 码力 | 277 页 | 3.61 MB | 1 年前3全栈⼯程师之路 Node.js
前端(moa-frontend) • SDK(OAuth Provider) • 辅助开发 cli ⼯工具 ⺫⽬目前进度 • 使⽤用 0.10.38,开发 Moajs 框架,Express / MongoDB • pm2 部署, 前后端分离 • 阿⾥里云的 slb 负载,alinode 监控 • moa-api, moa-frontend, moa-h5 (未能⽤用) • 使⽤用 Redis bootstrap、bootstrap-table • jquery • gulp • nginx • 3)moa-api Features • ⾃自动加载路由 • ⽀支持mongodb配置 • 集成mongoosedao,快速写crud等dao接⼝口 • ⾃自带⽤用户管理 • 使⽤用jsonwebtoken做⽤用户鉴权 • ⽀支持migrate测试 • ⽀支持mocha测试 ⼀一下如何能做到Node全栈? Part 4: 如何全栈? 全栈核⼼心 • 后端不会的 UI(界⾯面相关) • 前端不会的 DB(业务相关) 从后端转 做后端的⼈人对数据库是⽐比较熟悉,⽆无论 MongoDB,还 是 Mysql、Postgres,对前端理解⽐比较弱,会基本的 Html,Css,模板引擎等⽐比较熟悉 4 阶段循序渐进,build 与⼯工具⻬齐⻜飞 从前端转 • 玩转 npm、gulp0 码力 | 50 页 | 1.35 MB | 1 年前3Node.js - the core
“mkdir -p” for Node Moment.js parses, manipulates and formats dates mongo-native Node driver for MongoDB Optimist command-line option parsing 122 Core Modules ... Recommended Userland Modules Request0 码力 | 124 页 | 7.87 MB | 1 年前3ThinkJS 3.0 中文文档
mobile: 'zh-CN' //必须为中国的⼿手机号 } } this.validate(); // todo } } mongoId 需要为 MongoDB 的 ObjectID, mongoId: true 。 multibyte 需要包含多字节字符, multibyte: true 。 url 需要为 url, url: true|options0 码力 | 129 页 | 2.12 MB | 1 年前3
共 8 条
- 1