Skip to content

Commit 2ec0381

Browse files
Merge pull request #267 from DefangLabs/linda-misc-readme
Miscellaneous readme updates
2 parents c76d202 + b02cdbe commit 2ec0381

File tree

1 file changed

+40
-20
lines changed

1 file changed

+40
-20
lines changed

README.md

Lines changed: 40 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,56 @@
22

33
[![1-click-deploy](https://defang.io/deploy-with-defang.png)](https://portal.defang.dev/redirect?url=https%3A%2F%2Fgithub.com%2Fnew%3Ftemplate_name%3Dsample-angular-express-template%26template_owner%3DDefangSamples)
44

5-
This project demonstrates both client-side component rendering and hydration with Angular, as well as server-side rendering with Node.js and Socket.IO for real-time communication. It also includes Docker configurations for easy deployment.
5+
This sample demonstrates how to deploy a full-stack Angular and Node.js application with Defang. It uses Socket.IO for real-time communication. The Docker setup ensures the app can be easily built and deployed.
66

7-
## NOTE
7+
## Prerequisites
88

9-
This sample showcases how you could deploy a full-stack application with Angular and Node.js using Defang. The Docker setup ensures the app can be easily built and deployed.
9+
1. Download [Defang CLI](https://github.com/DefangLabs/defang)
10+
2. (Optional) If you are using [Defang BYOC](https://docs.defang.io/docs/concepts/defang-byoc) authenticate with your cloud provider account
11+
3. (Optional for local development) [Docker CLI](https://docs.docker.com/engine/install/)
12+
4. Install [Node.js](https://nodejs.org/en/download/package-manager/)
13+
5. Install [Angular CLI](https://angular.io/cli)
1014

11-
## Essential Setup Files
15+
## Development
16+
For development, we use two local containers, one for the frontend Angular service and one for the backend service in Express. It also uses Caddy as a web server for serving static files.
1217

13-
1. Download [Defang CLI](https://github.com/defang-io/defang)
14-
2. (Optional) If you are using [Defang BYOC](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html) authenticated with your AWS account
15-
3. (Optional for local development) [Docker CLI](https://docs.docker.com/engine/install/)
18+
To run the application locally, you can use the following command:
1619

17-
## Prerequisites
20+
```bash
21+
docker compose -f compose.dev.yaml up --build
22+
```
1823

19-
1. Download [Defang CLI](https://github.com/defang-io/defang)
20-
2. (Optional) If you are using [Defang BYOC](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html) make sure you have properly authenticated your AWS account
21-
3. [Node.js](https://nodejs.org/en/download/package-manager/)
22-
4. [Angular CLI](https://angular.io/cli)
24+
## Configuration
2325

24-
## A Step-by-Step Guide for deployment
26+
For this sample, you will not need to provide [configuration](https://docs.defang.io/docs/concepts/configuration).
2527

26-
1. Open the terminal and type `defang login`
27-
2. Type `defang compose up` in the CLI
28-
3. Your app should be up and running with Defang in minutes!
28+
If you wish to provide configuration, see below for an example of setting a configuration for a value named `API_KEY`.
2929

30-
## Development
30+
```bash
31+
defang config set API_KEY
32+
```
33+
34+
## Deployment
35+
36+
> [!NOTE]
37+
> Download [Defang CLI](https://github.com/DefangLabs/defang)
38+
39+
### Defang Playground
40+
41+
Deploy your application to the Defang Playground by opening up your terminal and typing:
42+
```bash
43+
defang compose up
44+
```
45+
46+
### BYOC (AWS)
3147

32-
For development, we use two local containers, one for the frontend Angular service and one for the backend service in Express. It also uses Caddy as a web server for serving static files. To run the sample locally after cloning the repository, you can run on Docker by doing:
48+
If you want to deploy to your own cloud account, you can use Defang BYOC:
3349

34-
1. `docker compose -f compose.dev.yaml up --build`
50+
1. [Authenticate your AWS account](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html), and check that you have properly set your environment variables like `AWS_PROFILE`, `AWS_REGION`, `AWS_ACCESS_KEY_ID`, and `AWS_SECRET_ACCESS_KEY`.
51+
2. Run in a terminal that has access to your AWS environment variables:
52+
```bash
53+
defang --provider=aws compose up
54+
```
3555

3656
---
3757

@@ -41,4 +61,4 @@ Short Description: A full-stack application using Angular for the frontend and N
4161

4262
Tags: Angular, Node.js, Socket.IO, TypeScript, JavaScript
4363

44-
Languages: nodejs
64+
Languages: nodejs

0 commit comments

Comments
 (0)