{"id":43543367,"url":"https://github.com/devsapp/fc-docs-examples","last_synced_at":"2026-02-03T18:38:09.124Z","repository":{"id":217641000,"uuid":"744412134","full_name":"devsapp/fc-docs-examples","owner":"devsapp","description":"函数计算文档示例代码","archived":false,"fork":false,"pushed_at":"2024-03-04T10:19:08.000Z","size":35,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":10,"default_branch":"main","last_synced_at":"2024-03-05T08:43:16.465Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devsapp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-01-17T08:47:53.000Z","updated_at":"2024-03-05T08:43:16.466Z","dependencies_parsed_at":"2024-03-04T08:35:39.994Z","dependency_job_id":null,"html_url":"https://github.com/devsapp/fc-docs-examples","commit_stats":null,"previous_names":["devsapp/fc-docs-examples"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/devsapp/fc-docs-examples","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devsapp%2Ffc-docs-examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devsapp%2Ffc-docs-examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devsapp%2Ffc-docs-examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devsapp%2Ffc-docs-examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devsapp","download_url":"https://codeload.github.com/devsapp/fc-docs-examples/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devsapp%2Ffc-docs-examples/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29052648,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-03T15:43:47.601Z","status":"ssl_error","status_checked_at":"2026-02-03T15:43:46.709Z","response_time":96,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-02-03T18:38:06.337Z","updated_at":"2026-02-03T18:38:09.118Z","avatar_url":"https://github.com/devsapp.png","language":null,"readme":"# 简介\n\n函数计算文档示例代码\n\n# 如何新开发一个 3.0 的应用\n\n## 1. 初始化一个应用\n\n假设您想要的生成一个 nodejs 的 hello world 代码示例，您可以执行以下命令：\n\n```bash\ns init start-application-v3 -d  nodejs_hello_world\n```\n\n执行成功后会生成 nodejs_hello_world 目录\n\n## 2. 进入 nodejs_hello_world 目录进行组件开发\n\n| 目录         | 含义                                                     |\n| ------------ | -------------------------------------------------------- |\n| readme.md    | 对该组件的描述，或帮助文档信息                           |\n| version.md   | 版本的描述，例如当前版本的更新内容等                     |\n| publish.yaml | 项目所必须的文件，Serverless Devs Package 的开发识别文档 |\n| src          | 应用所在目录，需要包括`s.yaml`和相关的应用代码等         |\n\n此时，开发者可以在 src 下完成应用的开发，并对项目进行`publish.yaml`文件的编写。完成之后，即可通过以下几个步骤发布项目：\n\n- 更改 `publish.yaml` 里的 `Name` 字段，给自己的应用取一个名字，分类和 Service 参考注释中的 https://api.devsapp.cn/v3/common/args.html\n\n- 更改 `publish.yaml` 里的 `Version` 字段为 dev\n\n- 取消掉 `publish.yaml` 里的 `Organization` 注释\n\n  \u003e 默认的模版中 publish.yaml 中的 \"Organization: 阿里云函数计算（FC）\" 是注释掉的， 如果取消注释的话，设置应用属于阿里云函数计算（FC）组织的话， 执行 `s registry login`, 完成 github 授权登录，然后把 github 名字告诉江昱或者西流后台添加下到对应的组织才有权限发布\n\n- 在 publish.yaml 所在的目录上执行 `s cli alireadme3` 完成应用 readme 的编写\n\n  \u003e - readme_en.md 可以可删除不考虑\n  \u003e - 如果您的应用部署完毕后， 有固定 event 测试 case, 也可以在 readme 采用如下方式添加测试用例，文档那边有能力取到这个 test case, 比如:\n\n  ````plaintext\n    \u003cdiv name=\"test-case\" hidden\u003e\n    ```plaintext\n    {\n        \"key\": \"value\"\n    }\n    ```\n    \u003c/div\u003e\n  ````\n\n- 首次发布需要通过 [registry](https://docs.serverless-devs.com/serverless-devs/command/registry) 命令先登录 Serverless Devs Registry。\n\n  ```bash\n  s registry login\n  ```\n\n  随后浏览器会跳出登陆窗口，根据提示进行操作即可。\n\n- 后续直接执行 `s registry publish` 即可进行发布\n\n- 测试应用\n\n  如果您使用 dev 版本进行了应用的发布， 假设您的应用名字为 start-application-v3, 那么您可以使用：\n\n  - 本地终端执行: `s init start-application-v3@dev`\n  - 浏览器打开: https://fcnext.console.aliyun.com/applications/create?template=start-application-v3@dev 进行测试\n\n- 发布正式版本\n\n  更改 `publish.yaml` 里的 `Version` 字段为 0.0.1, 确保版本号比现有最高版本号大 1，例如：0.0.1 -\u003e 0.0.2。\n\n## 3. 提交 PR，将您开发的新应用合并 master\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevsapp%2Ffc-docs-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevsapp%2Ffc-docs-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevsapp%2Ffc-docs-examples/lists"}