You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/getting-started/getting-started.md
+77-39Lines changed: 77 additions & 39 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,66 +8,104 @@ description: Get started with Defang.
8
8
# Getting Started
9
9
10
10
11
-
###Install the CLI
11
+
## Install the CLI
12
12
13
13
First, you'll need to install the Defang CLI. The CLI is the primary way to interact with Defang. It allows you to create, deploy, and manage your services. You can find the [different installation methods here](./installing.md).
14
14
15
-
### Authenticate with Defang
15
+
##Generate a project
16
16
17
-
To do pretty much anything with Defang, you'll need to authenticate with the platform. You can do this by running the following command:
18
-
19
-
```bash
20
-
defang login
17
+
```
18
+
$ defang generate nodejs-http
21
19
```
22
20
23
-
:::info
24
-
To learn more about how authentication works in defang, check out the [authenticating page](./authenticating.md).
25
-
:::
26
-
27
-
### Agree to the terms of service
21
+
You should see the following prompt:
22
+
```
23
+
? What folder would you like to create the project in?
24
+
```
25
+
Type in the name of the folder you'd like to use for your new project and press ENTER.
28
26
29
-
Before you can deploy code you should read and agree to our the terms of service. You can do this by running:
27
+
I'll type `"welcome-to-defang"`. Now, you'll see the following output:
30
28
31
-
```bash
32
-
defang terms
29
+
```
30
+
? What folder would you like to create the project in? welcome-to-defang
31
+
* Fetching sample from the Defang repository...
32
+
* Writing files to disk...
33
+
- .github/
34
+
- .github/workflows/
35
+
- .github/workflows/deploy.yaml
36
+
- README.md
37
+
- app/
38
+
- app/Dockerfile
39
+
- app/main.js
40
+
- compose.yaml
41
+
* Code generated successfully in folder welcome-to-defang
42
+
43
+
Check the files in your favorite editor.
44
+
To deploy the service, do `cd welcome-to-defang` and
45
+
46
+
defang compose up
33
47
```
34
48
35
-
### Build and Deploy Services
49
+
Now, navigate to the folder you just created:
36
50
37
-
Defang supports various ways of creating and deploying services to the cloud. The following tutorials dive into each one in more detail:
51
+
```
52
+
$ cd welcome-to-defang
53
+
```
38
54
39
-
1.[Deploy an outline using AI](../tutorials/generate-new-code-using-ai.mdx)
40
-
2.[Build and deploy your code](../tutorials/deploy-code-compose.mdx)
4.[Deploy using Pulumi](../tutorials/deploy-using-pulumi.mdx)
55
+
You can open the folder in your favorite editor and see the files that were generated for you:
56
+
* The `app` folder contains the code for your service.
57
+
* The `Dockerfile` is used to build the container image for your service.
58
+
* The `compose.yaml` file is used to define the services you want to deploy.
43
59
60
+
## Deploy to the playground
44
61
45
-
### Monitor Services
62
+
Go back to your shell and type the following:
46
63
47
-
By default, all the output (stdout and stderr) from your app is logged. You can view these logs in real-time. You can view logs for all your services, one service, or even one specific deployment of a service.
6.[Deploy using Pulumi](../tutorials/deploy-using-pulumi.mdx)
73
110
111
+
Choose the direction that seems the most interesting. If you have any questions, join the [Defang Discord](https://discord.gg/defang) and we'll be happy to help you out.
0 commit comments