GithubHelp home page GithubHelp logo

egg-ts-project's Introduction

egg-ts-project

用于学习node框架egg.js的项目

本地开发

$ npm i
$ npm run dev
$ open http://localhost:7001/

部署

$ npm start
$ npm stop

单元测试

  • [egg-bin] 内置了 [mocha], [thunk-mocha], [power-assert], [istanbul] 等框架,让你可以专注于写单元测试,无需理会配套工具。
  • 断言库非常推荐使用 [power-assert]。
  • 具体参见 egg 文档 - 单元测试

内置指令

  • 使用 npm run lint 来做代码风格检查。
  • 使用 npm test 来执行单元测试。
  • 使用 npm run autod 来自动检测依赖更新,详细参见 autod

Commit 提交规范

根据 angular 规范提交 commit, 这样 history 看起来更加清晰,还可以自动生成 changelog。

<type>(<scope>): <subject>
<BLANK LINE>
<body>
<BLANK LINE>
<footer>

数据库设计相关文档

  • 对于大多数有价值的数据删除,大多数使用 soft dalete,实现方式参考 Laravel

开发历程

2019-3-18 项目初始化,使用TSLint规范代码

  • 使用egg框架搭建Typescript基础工程
  • 创建项目实例代码,生成基础的文件
  • 添加数据库配置,引入egg-sequelize,mysql2作为数据库创建基础模型
  • 新增用户表

2019-3-20 添加表单校验

  • 创建用户注册模块
  • 引入egg-validate-plus作为表单校验插件
  • 引入bcryptjs作为表单数据加密插件

2019-3-27 记录一次坑

  • 添加AOuth2.0
  • 移除AOuth2.0

2019-3-31 新增课程表模型

  • 新增课程表
  • 新增创建课程表模块
  • 新增获取课程表模块

egg-ts-project's People

Contributors

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