> For the complete documentation index, see [llms.txt](https://mixdao.gitbook.io/dfinity/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mixdao.gitbook.io/dfinity/si-.-jiao-cheng/2.-shi-yong-actor-cha-xun/xiu-gai-mo-ren-pei-zhi.md).

# 修改默认配置

在[探索默认项目](https://github.com/chengshuzhi/DfinityTutorials/tree/67efaf95e3f292cfe2fc958ffec63d10ccf7a6f9/si-.-jiao-cheng/1.-tan-suo-mo-ren-xiang-mu)章节，已经介绍了创建新项目会添加一个dfx.json配置文件到项目目录。在本章节中，需要修改一些默认配置。

dfx.json配置修改步骤

1. 在编辑器中，打开 dfx.json 配置文件。
2. 查看actor\_hello项目中的默认配置。
3. 注意源码的名称和路径以及输出文件都使用actor\_hello项目名称。\
   例如，默认的canister名称是actor\_hello并且默认的主程序路径是

   **`src/actor_hello/main.mo。`**

   这些文件和目录可以重命名，但是要确保这些文件和目录的名称和dfx.json配置文件中的一

   致。如果使用默认的目录和文件名称，则无需修改。
4. 删除所有的actor\_hello\_assets配置。<br>

   本章节的示例程序无需使用如何前端资源，因此可以删除这些配置。

   以下是删除actor\_hello\_assets配置后的示例配置。

   ```
   {
     "canisters": {
       "actor_hello": {
         "main": "src/actor_hello/main.mo",
         "type": "motoko"
       }
     },
     "defaults": {
       "build": {
         "packtool": ""
       }
     },
     "dfx": "0.7.0",
     "networks": {
       "local": {
         "bind": "127.0.0.1:8000",
         "type": "ephemeral"
       }
     },
     "version": 1
   }
   ```
5. 保存并关闭配置文件继续。
