Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit 98657ac

Browse files
refresh documentation (#693)
Co-authored-by: David Moore <[email protected]>
1 parent 3c63c9d commit 98657ac

31 files changed

+575
-518
lines changed

docs/get-started/foundations/projects/index.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Here are some examples of basic Nitric project structures:
2828

2929
<TabItem label="JavaScript">
3030

31-
```text JavaScript
31+
```text
3232
my-project/
3333
├── nitric.yaml
3434
├── nitric.aws.yaml
@@ -41,7 +41,7 @@ my-project/
4141

4242
<TabItem label="TypeScript">
4343

44-
```text JavaScript
44+
```text
4545
my-project/
4646
├── nitric.yaml
4747
├── nitric.aws.yaml
@@ -54,7 +54,7 @@ my-project/
5454

5555
<TabItem label="Python">
5656

57-
```text Python
57+
```text
5858
my-project/
5959
├── nitric.yaml
6060
├── nitric.aws.yaml
@@ -67,7 +67,7 @@ my-project/
6767

6868
<TabItem label="Go">
6969

70-
```text Go
70+
```text
7171
my-project/
7272
├── nitric.yaml
7373
├── nitric.aws.yaml

docs/get-started/quickstart.mdx

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ Navigate to the new project directory and install the dependencies:
9494

9595
<TabItem label="TypeScript">
9696

97-
```bash TypeScript
97+
```bash
9898
cd hello-world
9999

100100
npm install
@@ -104,7 +104,7 @@ npm install
104104

105105
<TabItem label="JavaScript">
106106

107-
```bash JavaScript
107+
```bash
108108
cd hello-world
109109

110110
npm install
@@ -114,7 +114,7 @@ npm install
114114

115115
<TabItem label="Python">
116116

117-
```bash Python
117+
```bash
118118
cd hello-world
119119

120120
uv sync
@@ -131,7 +131,7 @@ If there are other dependency managers you would like to see supported, please l
131131

132132
<TabItem label="Go">
133133

134-
```bash Go
134+
```bash
135135
cd hello-world
136136

137137
go mod tidy
@@ -141,7 +141,7 @@ go mod tidy
141141

142142
<TabItem label="Dart">
143143

144-
```bash Dart
144+
```bash
145145
cd hello-world
146146

147147
dart pub get
@@ -157,9 +157,9 @@ Your project should now look like this:
157157

158158
<TabItem label="TypeScript">
159159

160-
```txt TypeScript
160+
```txt
161161
+--services/
162-
| +-- hello.ts
162+
| +-- api.ts
163163
+--node_modules/
164164
| ...
165165
+--package-lock.json
@@ -172,9 +172,9 @@ Your project should now look like this:
172172

173173
<TabItem label="JavaScript">
174174

175-
```txt JavaScript
175+
```txt
176176
+--services/
177-
| +-- hello.js
177+
| +-- api.js
178178
+--node_modules/
179179
| ...
180180
+--package-lock.json
@@ -187,7 +187,7 @@ Your project should now look like this:
187187

188188
<TabItem label="Python">
189189

190-
```txt Python
190+
```txt
191191
+--services/
192192
| +-- api.py
193193
+--.env
@@ -204,7 +204,7 @@ Your project should now look like this:
204204

205205
<TabItem label="Go">
206206

207-
```txt Go
207+
```txt
208208
+--services/hello/
209209
| +-- main.go
210210
+--go.mod
@@ -218,9 +218,9 @@ Your project should now look like this:
218218

219219
<TabItem label="Dart">
220220

221-
```txt Dart
221+
```txt
222222
+--services/
223-
| +-- hello.dart
223+
| +-- api.dart
224224
+--analysis_options.yaml
225225
+--pubspec.lock
226226
+--pubspec.yaml
@@ -270,7 +270,7 @@ Start by opening the `hello` service in your editor and adding a new route to th
270270

271271
<CodeSwitcher tabs>
272272

273-
```typescript !! title:services/hello.ts
273+
```typescript !! title:services/api.ts
274274
import { api } from '@nitric/sdk'
275275

276276
const helloApi = api('main')
@@ -289,7 +289,7 @@ helloApi.get('/goodbye/:name', async (ctx) => {
289289
})
290290
```
291291

292-
```javascript !! title:services/hello.js
292+
```javascript !! title:services/api.js
293293
import { api } from '@nitric/sdk'
294294

295295
const helloApi = api('main')
@@ -308,7 +308,7 @@ helloApi.get('/goodbye/:name', async (ctx) => {
308308
})
309309
```
310310

311-
```python !! title:services/hello.py
311+
```python !! title:services/api.py
312312
from nitric.resources import api
313313
from nitric.application import Nitric
314314

@@ -357,7 +357,7 @@ func main() {
357357
}
358358
```
359359

360-
```dart !! title:services/hello.dart
360+
```dart !! title:services/api.dart
361361
import 'package:nitric_sdk/nitric.dart';
362362
363363
void main() {

docs/guides/dart/flutter.mdx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ code word_generator
7878

7979
Let's start by building out the backend. This will be an API with a route dedicated to getting a list of all the favorites and a route to toggle a favorite on or off. These favorites will be stored in a [key value store](/keyvalue). To create a Nitric project add the `nitric.yaml` to the Flutter template project.
8080

81-
```yaml {{ label: "nitric.yaml" }}
81+
```yaml title:nitric.yaml
8282
name: word_generator
8383
services:
8484
- match: lib/services/*.dart
@@ -1414,7 +1414,7 @@ nitric stack new dev aws
14141414

14151415
You'll then need to edit the `nitric.dev.yaml` file to add a region.
14161416

1417-
```yaml {{ label: "nitric.dev.yaml" }}
1417+
```yaml title:nitric.dev.yaml
14181418
provider: nitric/[email protected]
14191419
region: us-east-1
14201420
```
@@ -1428,7 +1428,7 @@ Because we've mixed Flutter and Dart dependencies, we need to use a [custom cont
14281428
Flutter application, this step is unnecessary.
14291429
</Note>
14301430

1431-
```yaml {{ label: "nitric.yaml" }}
1431+
```yaml title:nitric.yaml
14321432
name: word_generator
14331433
services:
14341434
- match: lib/services/*.dart
@@ -1442,7 +1442,7 @@ runtimes:
14421442

14431443
Create the Dockerfile at the same path as your runtime specifies. This Dockerfile is fairly straightforward, taking its
14441444

1445-
```dockerfile {{ label: "docker/flutter.dockerfile" }}
1445+
```dockerfile title:docker/flutter.dockerfile
14461446
FROM dart:stable AS build
14471447
14481448
# The Nitric CLI will provide the HANDLER arg with the location of our service
@@ -1487,7 +1487,7 @@ ENTRYPOINT ["/app/bin/main"]
14871487

14881488
We can also add a `.dockerignore` to optimize our image further:
14891489

1490-
```txt {{ label: "docker/flutter.dockerignore" }}
1490+
```txt title:docker/flutter.dockerignore
14911491
build
14921492
test
14931493
@@ -1505,15 +1505,15 @@ web
15051505
windows
15061506
```
15071507

1508-
### AWS
1508+
### Deploy
1509+
1510+
Now that the application has been configured for deployment, let's try deploying it with the `up` command.
15091511

15101512
<Note>
15111513
Cloud deployments incur costs and while most of these resource are available
15121514
with free tier pricing you should consider the costs of the deployment.
15131515
</Note>
15141516

1515-
Now that the application has been configured for deployment, let's try deploying it with the `up` command.
1516-
15171517
```bash
15181518
nitric up
15191519

0 commit comments

Comments
 (0)