Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • J jz-api-core
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Infrastructure Registry
  • Analytics
    • Analytics
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • jizhi-backend
  • jz-api-core
  • Wiki
  • jz backend project skeleton

jz backend project skeleton · Changes

Page history
xigua created page: jz backend project skeleton authored Jul 16, 2017 by xigua's avatar xigua
Hide whitespace changes
Inline Side-by-side
Showing with 4 additions and 1 deletion
+4 -1
  • jz-backend-project-skeleton.md jz-backend-project-skeleton.md +4 -1
  • No files found.
jz-backend-project-skeleton.md
View page @ cdaf2615
......@@ -36,10 +36,13 @@
- BeforeUpdate - 到数据库更新entity之前
- AfterUpdate - 到数据库更新entity之后
- 具体的某个entity的写法就是在这8个hook前加上entity type的名字,比如 blogBeforeSave, messageAfterSave,下面是一个例子
```
export const messageBeforeSave = (resolve, reject, result, err, context: Common.Context) => {
let me = context.me;
result['fromUserId'] = me._id;
resolve(result);
}
```
\ No newline at end of file
```
- cron Job - 很多应用需要在某个时间进行数据统计等工具,具体详见lib/cron.ts
- 剩下的用户自定义API接口可以自行在 graphql/__custom.ts 文件中进行添加
\ No newline at end of file
Clone repository
  • Home
  • jz backend project skeleton