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
@@ -23,21 +23,19 @@ In addition, since you’re working with standard web technologies your apps sho
23
23
24
24
Visit [https://developers.reddit.com/new](https://developers.reddit.com/new) and choose one of our templates or take a look at the github repositories:
| Serverless endpoints | The node server will run just long enough to execute your endpoint function and return a response, which means you can’t use packages that require long-running connections like streaming. |
| Serverless endpoints | The node server will run just long enough to execute your endpoint function and return a response, which means you can’t use packages that require long-running connections like streaming. |
38
36
| Package limitations | Developers cannot use `fs` or external native packages. For now, we recommend using external services over the native dependencies, such as [StreamPot](https://streampot.io/) (instead of ffmpeg) and [OpenAI](https://platform.openai.com/docs/guides/embeddings) (instead of @xenova/transformers) . |
39
-
| Single request and single response handling only | Streaming or chunked responses and websockets are not supported. Long-polling is supported if it’s under the max request time. |
40
-
| No external requests from your client | You can’t have any external requests other than the app's webview domain. All backend responses are locked down to the webview domain via CSP. (Your backend can make external fetch requests though.) |
37
+
| Single request and single response handling only | Streaming or chunked responses and websockets are not supported. Long-polling is supported if it’s under the max request time. |
38
+
| No external requests from your client | You can’t have any external requests other than the app's webview domain. All backend responses are locked down to the webview domain via CSP. (Your backend can make external fetch requests though.) |
41
39
42
40
Devvit Web still has the same technical requirements:
43
41
@@ -47,7 +45,6 @@ Devvit Web still has the same technical requirements:
47
45
- Max response size: 10MB
48
46
- HTML/CSS/JS only
49
47
50
-
51
48
## Devvit Web components
52
49
53
50
Devvit Web uses endpoints between the client and server to make communication similar to standard web apps. A Devvit Web app has three components:
@@ -59,10 +56,10 @@ Devvit Web uses endpoints between the client and server to make communication si
59
56
Devvit Web templates all have the same file structure:
60
57
61
58
```tsx
62
-
-src
63
-
-client/// contains the webview code
64
-
-server/// endpoints for the client
65
-
-devvit.json; // the devvit config file
59
+
-src-
60
+
client/// contains the webview code
61
+
-server/// endpoints for the client
62
+
-devvit.json; // the devvit config file
66
63
```
67
64
68
65
Now, instead of passing messages with postMessage (old way), you’ll define `/api/endpoints` (new way).
@@ -83,7 +80,11 @@ We also provide an authentication middleware so you don’t have to worry about
83
80
All server endpoints must start with `/api/` (e.g. `/api/get-something` or `/api/widgets/42`).
0 commit comments