Skip to content

Commit

Permalink
Feat/serverless docs (#153)
Browse files Browse the repository at this point in the history
* feat(jzero): update docs
  • Loading branch information
jaronnie authored Dec 18, 2024
1 parent 35c200c commit f6a16b4
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* 将 jzero 应用部署在 [Vercel](https://vercel.com), [模板仓库分支](https://github.com/jzero-io/templates/tree/api-vercel), [代码示例](https://github.com/jaronnie/go-serverless-vercel)
* 基于 git change 生成代码, 极大提升大型项目开发体验
* 基于 jzero 的[后台管理系统](https://github.com/jzero-io/jzero-admin), [演示地址1-部署在vercel](https://admin.jzero.io), [演示地址2-部署在阿里云函数计算](https://jzero-admin.jaronnie.com)
* 基于 jzero 的 [serverless](https://docs.jzero.io/guide/serverless.html) 特性, 实现多模块解藕, 在编译阶段实现第三方模块的自动依赖注入

中文 | [ENGLISH](README-EN.md)

Expand Down
2 changes: 1 addition & 1 deletion docs/src/guide/new.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ docker run --rm -v ${PWD}:/app ghcr.io/jzero-io/jzero:latest new your_project --
```
:::

## 场景五: 命令行项目
## 场景四: 命令行项目

:::tip
基于 [cobra](https://github.com/spf13/cobra) 构建命令行项目
Expand Down
33 changes: 33 additions & 0 deletions docs/src/guide/serverless.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
title: serverless
icon: catppuccin:serverless
order: 3.5
---

## 新建 core 核心模块

```shell
jzero serverless new core --core
cd core
jzero gen
go mod tidy
```

## 新建业务模块

```shell
cd core
jzero serverless new b1
cd plugins/b1
jzero gen
go mod tidy
```

## 构建 serverless

```shell
cd core
jzero serverless build

go run main.go server
```
2 changes: 1 addition & 1 deletion docs/src/guide/template.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: 模版
title: 模版特性
icon: vscode-icons:folder-type-template
star: true
order: 5.3
Expand Down

0 comments on commit f6a16b4

Please sign in to comment.