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: README.md
+26-4Lines changed: 26 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,11 @@
4
4
5
5
This repo is for the serverless backend API that we build over the course of the tutorial. You can find the repo for the frontend React app [here](https://github.com/AnomalyInnovations/serverless-stack-demo-client). And the repo for the tutorial [here](https://github.com/AnomalyInnovations/serverless-stack-com).
-**infrastructure**: An [SST](https://github.com/serverless-stack/serverless-stack) app
11
+
7
12
#### Steps
8
13
9
14
To support the different chapters and steps of the tutorial; we use branches to represent the project codebase at the various points. Here is an index of the various chapters and branches in order.
@@ -20,14 +25,31 @@ To use this repo locally you need to have the [Serverless framework](https://ser
Head over to the `infrastructure/` directory and install the npm packages.
35
+
36
+
```bash
27
37
$ npm install
28
38
```
29
39
30
-
Run a single API on local.
40
+
And build the SST app.
41
+
42
+
```bash
43
+
$ npx sst build
44
+
```
45
+
46
+
Then deploy it to your AWS account
47
+
48
+
```bash
49
+
$ npx sst deploy
50
+
```
51
+
52
+
Then head over to `services/notes/`. And run a single API endpoint locally.
31
53
32
54
```bash
33
55
$ serverless invoke local --function list --path event.json
@@ -47,13 +69,13 @@ Where, `event.json` contains the request event info and looks something like thi
47
69
}
48
70
```
49
71
50
-
Finally, run this to deploy to your AWS account.
72
+
Finally, run this to deploy to the API to your AWS account.
51
73
52
74
```bash
53
75
$ serverless deploy
54
76
```
55
77
56
-
This project refers to an `.env` file for secret environment variables that are not checking in to the repo. Make sure to create one before dpeloying - https://serverless-stack.com/chapters/load-secrets-from-env.html.
78
+
The API service refers to an `.env` file for secret environment variables that are not checking in to the repo. Make sure to create one before deploying - https://serverless-stack.com/chapters/load-secrets-from-env.html.
0 commit comments