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
<palign="center">A progressive <ahref="http://nodejs.org"target="blank">Node.js</a> framework for building efficient and scalable server-side applications, heavily inspired by <ahref="https://angular.io"target="blank">Angular</a>.</p>
Deployment is done using AWS CDK. You can find deployment configuration in `./deploy` folder.
66
+
67
+
To run deployment, you need to have AWS credentials set up on your machine.
68
+
69
+
Run deployment if you have AWS credentials in your environment variables:
70
+
71
+
```bash
72
+
$ npm run build
73
+
$ npm run deploy
74
+
```
75
+
76
+
If you set up AWS Profile in your `~/.aws/credentials` file, you can run deployment with the following command:
77
+
78
+
```bash
79
+
$ npm run build
80
+
$ npm run deploy -- --profile <profile-name>
81
+
```
82
+
83
+
When deployment is done, you can find the url of deployed API in the output of the command.
84
+
85
+
```
86
+
Outputs:
87
+
nodejs-aws-cart-api.Url = <url>
88
+
```
89
+
90
+
#### How it works
91
+
92
+
When you run `npm run deploy`, cdk bundles all your code into a single js file using `esbuild`, uploads it to S3, generates CloudFormation template representing the change and deploying it to the AWS account.
93
+
94
+
### Notes
95
+
96
+
Due to how NestJS is written, some modules are marked as "external" and are not included in the final bundle:
97
+
98
+
-@nestjs/microservices
99
+
-@nestjs/websockets
100
+
- class-transformer
101
+
- class-validator
102
+
103
+
If you want to use any of this modules, you need to add them to package.json, install and remove from `deploy/Stack.ts`.
104
+
63
105
## Support
64
106
65
107
Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support).
@@ -72,4 +114,4 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
0 commit comments