模块开发指南之模板编写

This commit is contained in:
undefined committed 2020-05-19 11:23:20 +08:00
1 parent b6dce8a030
commit 747cb1b9b5
12 files changed
+236 -195

No files matched your search

+8
View File
@@ -2,3 +2,11 @@
Hydro 后端使用 NodeJS 编写,前端使用 JQuery + React。
代码风格遵循 airbnb 标准(详见 .eslintrc.js)。
由于模块中不能使用 require() 引入 Hydro 的文件,因此需要从 global.Hydro 中取出需要的模块。
例:
```js
const { db } = global.Hydro.service;
const { problem } = global.Hydro.model;
```