Skip to content

Commit 3e9b70a

Browse files
authored
Update generate-new-code-using-ai.mdx
1 parent 9fc23ac commit 3e9b70a

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

docs/tutorials/generate-new-code-using-ai.mdx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,12 @@ sidebar_position: 50
88
Defang supports generating new project outlines using integration with an AI model. Using this feature, you can describe what you would like the service to do and the CLI will then generate a project outline with all the files required to make it work.
99
<iframe width="560" height="315" src="https://www.youtube.com/embed/afglsBYieuc?si=GCvHhBu3H9ktMDHA" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
1010

11-
## Step 1 - Use the CLI generate command
1211

12+
In this tutorial we'll use the following prompt:
13+
14+
A basic service with 2 REST endpoints. The default endpoint will be for health check and should return a JSON object like this: { "status": "OK" }. The /echo endpoint will echo back all request parameters in the response.
15+
16+
## Step 1 - Use the CLI generate command
1317
```text
1418
defang generate
1519
@@ -30,7 +34,7 @@ project1
3034

3135
This will generate the different files required to start your project based on your prompt and the language selected.
3236

33-
## Step 3 - Review the Code
37+
## Step 2 - Review the Code
3438

3539
Change into the new project folder:
3640
```shell
@@ -39,7 +43,7 @@ cd project1
3943

4044
You can open the files in a code editor to review or make changes as needed before deploying the service.
4145

42-
## Step 4 - Build and Deploy
46+
## Step 3 - Build and Deploy
4347

4448
```bash
4549
defang compose up

0 commit comments

Comments
 (0)