上一页 1 ··· 22 23 24 25 26 27 28 29 30 ··· 142 下一页
摘要: 1.项目目录 category.controller.ts /** * 分类 控制器 */ import { Controller, Get, Ctx, Post } from 'koa-controllers'; import { Context } from 'koa'; import { Mo 阅读全文
posted @ 2020-02-01 21:30 每天都要进步一点点 阅读(220) 评论(0) 推荐(0)
摘要: 1.模板入口文件 app/models/index.ts 'use strict'; // const fs = require('fs'); import * as fs from 'fs'; // const path = require('path'); import * as path fr 阅读全文
posted @ 2020-01-31 12:30 每天都要进步一点点 阅读(423) 评论(0) 推荐(0)
摘要: 1.入口文件,引入 koa-controllers 模块 npm i -S koa-controllers npm i -S reflect-metadata app/index.ts // import Koa from 'koa'; // 错误的写法 // import Koa = requir 阅读全文
posted @ 2020-01-30 12:30 每天都要进步一点点 阅读(858) 评论(0) 推荐(0)
摘要: 修改nodejs应用中的程序文件后必须重启nodejs才能重新加载应用代码。这是因为nodejs加载过一次文件后就将其缓存在内存中,以后再读取这个文件直接从内存中读取,所以后面再修改此文件nodejs都不会加载了。supervisor是检测文件中js改变之后能重新加载。 1、npm -g insta 阅读全文
posted @ 2020-01-29 21:30 每天都要进步一点点 阅读(299) 评论(0) 推荐(0)
摘要: 1.创建 tsconfig.json 文件 // 全局安装 typescript npm install -g typescript // 更新 typescript npm update -g typescript // 查看版本 tsc -v // 初始化 tsc --init 2.tsconf 阅读全文
posted @ 2020-01-28 17:05 每天都要进步一点点 阅读(487) 评论(0) 推荐(0)
摘要: 1.用户表种子文件(示例): seeders/20200204173530-user.js const md5 = require('md5'); const moment = require('moment'); module.exports = { up: (queryInterface, Se 阅读全文
posted @ 2020-01-27 17:05 每天都要进步一点点 阅读(356) 评论(0) 推荐(0)
摘要: 创建数据库 .\node_modules\.bin\sequelize db:create 创建迁移文件 .\node_modules\.bin\sequelize migration:create --name user #### 创建数据库 > sequelize db:create #### 阅读全文
posted @ 2020-01-26 21:30 每天都要进步一点点 阅读(393) 评论(0) 推荐(0)
摘要: 1.README.md # 设计数据库结构 ### sequelize库 需要安装下面两个模块 - sequelize : 供程序使用 - sequelize-cli : 供命令行使用的工具 #### 初始化 sequelize init 即 .\node_modules\.bin\sequeliz 阅读全文
posted @ 2020-01-25 21:02 每天都要进步一点点 阅读(405) 评论(0) 推荐(0)
摘要: 在使用Git做版本管理器的时候,我们需要经常去git hub上拉取请求,而如果设置了协作者,只需要去一个人的git hub上提交/更新项目 假设三个人共同开发项目,我们只需其中一个去把项目用Git上传到git hub上,然后去设置协作者,在代码仓库上有个setting 这样你们三个人可以再Idea中 阅读全文
posted @ 2020-01-24 17:05 每天都要进步一点点 阅读(188) 评论(0) 推荐(0)
该文被密码保护。 阅读全文
posted @ 2020-01-23 10:57 每天都要进步一点点 阅读(23) 评论(0) 推荐(0)
上一页 1 ··· 22 23 24 25 26 27 28 29 30 ··· 142 下一页