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
This README uses `npm` for commands. If you're using `yarn` or `pnpm`, utilize the equivalent version of the commands.
62
62
63
-
1. Create a `.env` file:
63
+
1. Create a `.env` file. This is to support any variable in the Serverless Configuration being read from `env:` and test running:
64
64
65
65
```bash
66
66
cp .env.example .env
@@ -92,11 +92,11 @@ npm start
92
92
93
93
### General Commands
94
94
95
-
-`build` bundles the project using the serverless packaging serverless. The produced artifacts will ship bundles shipped to AWS on deployment. You can optionally pass `--analyze <function name>` to run the bundle analyzer and visualize the results to understand your handler bundles.
95
+
-`build` bundles the project using the Serverless Framework's out of the box `package` command. The produced artifacts will be shipped to AWS on deployment. You can optionally pass `--analyze <function name>` to run the bundle analyzer and visualize the results to understand your handler bundles.
96
96
-`deploy` ships the project to the configured AWS account using the Serverless Framework CLI command.
97
97
-`start` runs the `serverless-offline` provided server for local development and testing. Be sure to have the local docker infrastructure running to emulate the related services.
98
98
-`test` runs `jest` under the hood.
99
-
-`lint` runs `eslint` under the hood. You can use all the eslint available command line arguments. To lint the entire project, run `npm run lint .`, or equivalent. You can affix `--fix` to auto-correct linting issues that eslint can handle.
99
+
-`lint` runs `eslint` under the hood. You can use all the available eslint command line arguments. To lint the entire project, run `npm run lint .`, or equivalent. You can affix `--fix` to auto-correct linting issues that eslint can handle.
100
100
-`format:check` runs prettier format checking on all project files.
101
101
-`format:write` runs prettier format writing on all project files.
102
102
@@ -141,7 +141,7 @@ This starter kit ships with a set of RESTful APIs. All routes are served via `ht
141
141
142
142
## Serverless Configuration
143
143
144
-
This kit uses the TypeScript option for configuration. It is type checked using the `@serverless/typescript` definitions over the DefinitelyTyped definitions because DefinitelyTyped is currently behind on its definition. However, the `@serverless/typescript` types have known issues with certain fields are noted directly in the configuration.
144
+
This kit uses the TypeScript option for configuration. It is type checked using the `@serverless/typescript` definitions over the DefinitelyTyped definitions because DefinitelyTyped is currently behind on its definition. However, the `@serverless/typescript` types have known issues with certain fields, which are noted directly in the configuration.
145
145
146
146
It is not compatible with the automated CI/CD of the Serverless Dashboard as they only support the default YAML format. You can read more about [setting up CI/CD using GitHub for this project on the This Dot blog](https://www.thisdot.co/blog/github-actions-for-serverless-framework-deployments).
147
147
@@ -227,6 +227,8 @@ There is an existing [DynamoDB Local preset for Jest](https://github.com/shelfio
227
227
228
228
## Deployment
229
229
230
+
<!-- TODO: add note about AWS setup -->
231
+
230
232
As a serverless implementation, most of the infrastructure will be deployed and configured correctly simply utilizing the `deploy` script provided by this kit which is just an alias for [`serverless deploy`](https://www.serverless.com/framework/docs/providers/aws/cli-reference/deploy). However, the Redis instance is not configurable via the Serverless Configuration and will need to be set up ahead of your first deploy and configured via environment variables. We recommend using [Serverless Framework's interface for AWS Secret Manager](https://www.serverless.com/blog/aws-secrets-management/) for security purposes.
231
233
232
234
This entire stack can be deployed via CI tools such as GitHub Actions, CircleCI, etc. and is our recommended approach as this kit is incompatible with the Serverless Dashboard. The Serverless Dashboard CI only works with the configuration in the YAML format which we do not use to give developers type-safety in the config file.
0 commit comments