Skip to content

Commit f745273

Browse files
authored
Updating with SST info
1 parent 2279c4d commit f745273

1 file changed

Lines changed: 26 additions & 4 deletions

File tree

README.md

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44

55
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).
66

7+
This repo is split into:
8+
9+
- **services**: [Serverless Framework](https://github.com/serverless/serverless) services
10+
- **infrastructure**: An [SST](https://github.com/serverless-stack/serverless-stack) app
11+
712
#### Steps
813

914
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
2025
$ npm install serverless -g
2126
```
2227

23-
Clone this repo and install the NPM packages.
28+
Clone this repo.
2429

2530
```bash
2631
$ git clone https://github.com/AnomalyInnovations/serverless-stack-demo-api
32+
```
33+
34+
Head over to the `infrastructure/` directory and install the npm packages.
35+
36+
``` bash
2737
$ npm install
2838
```
2939

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.
3153

3254
```bash
3355
$ 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
4769
}
4870
```
4971

50-
Finally, run this to deploy to your AWS account.
72+
Finally, run this to deploy to the API to your AWS account.
5173

5274
```bash
5375
$ serverless deploy
5476
```
5577

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.
5779

5880
---
5981

0 commit comments

Comments
 (0)