imbajin commented on code in PR #262: URL: https://github.com/apache/incubator-hugegraph-doc/pull/262#discussion_r1218163989
########## content/cn/docs/contribution-guidelines/hugegraph-server-idea-setup.md: ########## @@ -0,0 +1,117 @@ +--- +title: "如何在 IDEA 中搭建 HugeGraph-Server 开发环境" +linkTitle: "如何在 IDEA 中搭建 HugeGraph-Server 开发环境" +weight: 4 +--- + +> 注意:下述配置仅供参考,基于[这个版本](https://github.com/apache/incubator-hugegraph/commit/a946ad1de4e8f922251a5241ffc957c33379677f),在 Linux 和 macOS 平台下进行了测试。 + +### 背景 + +在 [Quick Start](/docs/quickstart/hugegraph-server/) 部分已经介绍了使用**脚本**启停 HugeGraphServer 的流程。下面以 Linux 平台为例,介绍使用 **IntelliJ IDEA** 运行与调试 HugeGraph-Server 的流程。 + +本地启动的核心与**脚本启动**是一样的: + +1. 初始化数据库后端,执行 `InitStore` 类初始化图 +2. 启动 HugeGraphServer,执行 `HugeGraphServer` 类加载初始化的图信息启动 + +在执行下述流程之前,请确保已经克隆了 HugeGraph 的源代码,并且已经配置了 JDK 11 等开发环境。 + +```bash +git clone https://github.com/apache/hugegraph.git +``` + +### 步骤 + +#### 1. 配置文件拷贝 + +为了避免配置文件的更改影响 Git 的追踪,建议将所需的配置文件拷贝到一个单独的文件夹中: + +```bash +cp -r hugegraph-dist/src/assembly/static/scripts hugegraph-dist/src/assembly/static/conf path-to-your-directory +``` + +#### 2. `InitStore` 类初始化图 + +首先,需要在配置文件中配置数据库后端。以 RocksDB 为例,在 `path-to/conf/graphs/hugegraph.properties` 文件中进行以下配置: Review Comment: `<>` may hit the `HTML` tag and influence the UI like this ⬇️  So use `xx` for it or just remove the `<>`, I updated it -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
