# 修改默认配置

在探索默认项目章节，已经介绍了创建新项目会添加一个`dfx.json`配置文件到项目目录。在本章节中，需要修改一些默认配置。

dfx.json配置修改步骤

1. 在编辑器中，打开 `dfx.json` 配置文件，将默认的main设置从`main.mo`更改为`increment_counter.mo`。

   ```
   "main": "src/my_counter/increment_counter.mo",
   ```

   对于本教程，将源文件的名称从main.mo更改为increment\_counter.mo仅说明了dfx.json配置文件中的设置如何确定要编译的源文件。

   在更复杂的应用中，dfx.json配置文件中可能会有多个你要包含依赖的源文件需要管理。这种情况下-dfx.json文件中定义了多个canister和程序-有多个被命名为main.mo的文件可能会导致混乱。

   文件的其他部分无需修改。
2. 保存并关闭dfx.json继续。
3. 修改源代码目录中主程序的文件名来匹配dfx.json中的配置。

   ```
   mv src/my_counter/main.mo src/my_counter/increment_counter.mo
   ```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mixdao.gitbook.io/dfinity/si-.-jiao-cheng/4.-zi-ran-shu-zi-zeng/xiu-gai-mo-ren-pei-zhi.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
