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 `yarn` for commands. If you're using `npm` or `pnpm`, utilize the equivalent version of the commands.
61
+
This README uses `npm` for commands. If you're using `yarn` or `pnpm`, utilize the equivalent version of the commands.
62
62
63
63
1. Create a `.env` file:
64
64
65
65
```bash
66
66
cp .env.example .env
67
67
```
68
68
69
-
2. Run `yarn` to install deps
69
+
2. Run `npm i` to install deps
70
70
3. Standup the project infrastructure using docker via:
71
71
72
72
```bash
73
-
yarn infrastructure:up
73
+
npm run infrastructure:up
74
74
```
75
75
76
76
4. Sync database tables and seed the project via:
77
77
78
78
```bash
79
-
yarn db:sync
80
-
yarn db:seed
79
+
npm run db:sync
80
+
npm run db:seed
81
81
```
82
82
83
83
5. Start the local development server:
84
84
85
85
```bash
86
-
yarn start
86
+
npm start
87
87
```
88
88
89
89
6. Make changes and enjoy building your new backend!
@@ -96,7 +96,7 @@ yarn start
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 `yarn 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 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.
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
@@ -165,11 +165,11 @@ This project comes configured with 3 default stages: `dev`, `staging`, `producti
165
165
166
166
#### esbuild
167
167
168
-
This project uses [serverless-esbuild](https://www.npmjs.com/package/serverless-esbuild) over its webpack counterpart. The esbuild tool chain is generally faster and requires less dependencies to work out of the box.
168
+
This project uses [serverless-esbuild](https://www.npmjs.com/package/serverless-esbuild) over its webpack counterpart. The esbuild tool chain is generally faster and requires less dependencies to work out of the box. Currently, the tooling is configured to use `npm`. If you wish to use `yarn` or `pnpm`, please change the `packager` field in the configuration accordingly.
169
169
170
170
#### Bundle Analyzer
171
171
172
-
This project ships with the [serverless-analyze-bundle-plugin](https://www.npmjs.com/package/serverless-analyze-bundle-plugin) to allow you to visualize your Lambda bundles. This is an especially important factor when dealing with cold starts and should be monitored. To analyze a function bundle, run `yarn build --analyze <functionName>`. This will give you a visualization of your function's dependencies and their sizes.
172
+
This project ships with the [serverless-analyze-bundle-plugin](https://www.npmjs.com/package/serverless-analyze-bundle-plugin) to allow you to visualize your Lambda bundles. This is an especially important factor when dealing with cold starts and should be monitored. To analyze a function bundle, run `npm run build --analyze <functionName>`. This will give you a visualization of your function's dependencies and their sizes.
173
173
174
174
#### File Patterns
175
175
@@ -183,7 +183,7 @@ To help manage the database locally, the [`aaronshaf/dynamodb-admin`](https://gi
183
183
184
184
### Defining New Tables
185
185
186
-
To create a new table, define it via the `serverless.ts` resources section. It utilizes the [DynamoDB Cloudformation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dynamodb-table.html) to define data. Table names should be defined per environment through the Serverless `params` config. Once your table is defined, use the `yarn db:sync` command to create the table.
186
+
To create a new table, define it via the `serverless.ts` resources section. It utilizes the [DynamoDB Cloudformation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dynamodb-table.html) to define data. Table names should be defined per environment through the Serverless `params` config. Once your table is defined, use the `npm run db:sync` command to create the table.
187
187
188
188
### Defining New Seeds
189
189
@@ -203,7 +203,7 @@ seed: {
203
203
}
204
204
```
205
205
206
-
Once defined, run `yarn db:seed` to seed your database. See https://github.com/99x/serverless-dynamodb-local#seeding-sls-dynamodb-seed for more information.
206
+
Once defined, run `npm run db:seed` to seed your database. See https://github.com/99x/serverless-dynamodb-local#seeding-sls-dynamodb-seed for more information.
0 commit comments