mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 01:38:19 +08:00
模块开发指南之模板编写
This commit is contained in:
1 parent
b6dce8a030
commit
747cb1b9b5
12 files changed
+236
-195
No files matched your search
@@ -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;
|
||||
```
|
||||
Reference in new issue
Block a user