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

Commit 5c2ba76

Browse files
swap from labels to titles for code examples
1 parent 265ca73 commit 5c2ba76

18 files changed

+123
-125
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: 14 additions & 14 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,7 +157,7 @@ Your project should now look like this:
157157

158158
<TabItem label="TypeScript">
159159

160-
```txt TypeScript
160+
```txt
161161
+--services/
162162
| +-- api.ts
163163
+--node_modules/
@@ -172,7 +172,7 @@ Your project should now look like this:
172172

173173
<TabItem label="JavaScript">
174174

175-
```txt JavaScript
175+
```txt
176176
+--services/
177177
| +-- api.js
178178
+--node_modules/
@@ -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,7 +218,7 @@ Your project should now look like this:
218218

219219
<TabItem label="Dart">
220220

221-
```txt Dart
221+
```txt
222222
+--services/
223223
| +-- api.dart
224224
+--analysis_options.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/api.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/api.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/api.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/api.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: 5 additions & 5 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

docs/guides/jvm/serverless-rest-api-example.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ profileApi.get("/profiles/:id/image/download", (ctx) -> {
615615

616616
<TabItem label="Kotlin">
617617

618-
```kotlin Kotlin
618+
```kotlin
619619
profileApi.get("/profiles/:id/image/download") { ctx ->
620620
val id = ctx.req.params["id"]
621621

docs/guides/nodejs/byo-database.mdx

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,15 @@ languages:
66
- typescript
77
- javascript
88
published_at: 2022-10-13
9-
updated_at: 2024-06-14
9+
updated_at: 2024-12-30
1010
---
1111

1212
# BYO Database
1313

14-
Nitric currently has out of the box **preview** support for [SQL databases](/sql) with AWS, however Nitric allows you to use whatever tooling and ORMs you prefer for directly interfacing with your database. Our recommendation for local development is to set up a container that runs alongside your Nitric processes. For a production environment, you can use any of the database services for your preferred cloud:
14+
Nitric currently has out of the box **preview** support for [PostgreSQL databases](/sql), however Nitric allows you to use whatever tooling and ORMs you prefer for directly interfacing with your database. If you want to use a database that isn't managed by Nitric, we have the following recommendations:
1515

16-
<Note>
17-
You can track the support for relational databases
18-
[here](https://github.com/nitrictech/roadmap/issues/30).
19-
</Note>
16+
- For local development is to set up a container that runs alongside your Nitric processes.
17+
- For a production environment, you can use any of the database services for your preferred cloud:
2018

2119
| | AWS | GCP | Azure |
2220
| ---------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------- |
@@ -50,15 +48,15 @@ await client.connect()
5048

5149
To start, make sure you have a `.env` file containing your environment variables.
5250

53-
```
51+
```text title:.env
5452
POSTGRES_USER=root
5553
POSTGRES_PASSWORD=root
5654
POSTGRES_DB=my-database
5755
```
5856

5957
You can then create a docker compose file to simplify running your docker container each time.
6058

61-
```yaml {{ label: "docker-compose.yml" }}
59+
```yaml title:docker-compose.yml
6260
version: '3.6'
6361
services:
6462
postgres:
@@ -75,7 +73,7 @@ services:
7573
7674
You can add a script to your `package.json` which will run the docker compose file.
7775

78-
```json {{ label: "package.json" }}
76+
```json title:package.json
7977
"scripts": {
8078
"db": "docker compose up --wait"
8179
}
@@ -115,7 +113,7 @@ con.connect(function (err) {
115113

116114
You can then create a docker compose file to simplify running your docker container each time.
117115

118-
```yaml {{ label: "docker-compose.yml" }}
116+
```yaml title:docker-compose.yml
119117
version: '3.6'
120118
services:
121119
mysql:
@@ -133,7 +131,7 @@ services:
133131

134132
You can add a script to your `package.json` which will run the docker compose file.
135133

136-
```json {{ label: "package.json" }}
134+
```json title:package.json
137135
"scripts": {
138136
"db": "docker compose up --wait"
139137
}
@@ -165,7 +163,7 @@ await client.connect()
165163

166164
You can then create a docker compose file to simplify running your docker container each time.
167165

168-
```yaml {{ label: "docker-compose.yml" }}
166+
```yaml title:docker-compose.yml
169167
version: '3.6'
170168
services:
171169
mongodb:
@@ -182,7 +180,7 @@ services:
182180
183181
You can add a script to your `package.json` which will run the docker compose file.
184182

185-
```json {{ label: "package.json" }}
183+
```json title:package.json
186184
"scripts": {
187185
"db": "docker compose up --wait"
188186
}

docs/guides/nodejs/debugging.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,23 +51,23 @@ Before running the debugger, it's necessary to install the project's dependencie
5151

5252
<TabItem label="npm">
5353

54-
```bash npm
54+
```bash
5555
npm install
5656
```
5757

5858
</TabItem>
5959

6060
<TabItem label="yarn">
6161

62-
```bash yarn
62+
```bash
6363
yarn install
6464
```
6565

6666
</TabItem>
6767

6868
<TabItem label="pnpm">
6969

70-
```bash pnpm
70+
```bash
7171
pnpm install
7272
```
7373

0 commit comments

Comments
 (0)