Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/get-started/foundations/projects/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Here are some examples of basic Nitric project structures:

<TabItem label="JavaScript">

```text JavaScript
```text
my-project/
├── nitric.yaml
├── nitric.aws.yaml
Expand All @@ -41,7 +41,7 @@ my-project/

<TabItem label="TypeScript">

```text JavaScript
```text
my-project/
├── nitric.yaml
├── nitric.aws.yaml
Expand All @@ -54,7 +54,7 @@ my-project/

<TabItem label="Python">

```text Python
```text
my-project/
├── nitric.yaml
├── nitric.aws.yaml
Expand All @@ -67,7 +67,7 @@ my-project/

<TabItem label="Go">

```text Go
```text
my-project/
├── nitric.yaml
├── nitric.aws.yaml
Expand Down
34 changes: 17 additions & 17 deletions docs/get-started/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ Navigate to the new project directory and install the dependencies:

<TabItem label="TypeScript">

```bash TypeScript
```bash
cd hello-world

npm install
Expand All @@ -104,7 +104,7 @@ npm install

<TabItem label="JavaScript">

```bash JavaScript
```bash
cd hello-world

npm install
Expand All @@ -114,7 +114,7 @@ npm install

<TabItem label="Python">

```bash Python
```bash
cd hello-world

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

<TabItem label="Go">

```bash Go
```bash
cd hello-world

go mod tidy
Expand All @@ -141,7 +141,7 @@ go mod tidy

<TabItem label="Dart">

```bash Dart
```bash
cd hello-world

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

<TabItem label="TypeScript">

```txt TypeScript
```txt
+--services/
| +-- hello.ts
| +-- api.ts
+--node_modules/
| ...
+--package-lock.json
Expand All @@ -172,9 +172,9 @@ Your project should now look like this:

<TabItem label="JavaScript">

```txt JavaScript
```txt
+--services/
| +-- hello.js
| +-- api.js
+--node_modules/
| ...
+--package-lock.json
Expand All @@ -187,7 +187,7 @@ Your project should now look like this:

<TabItem label="Python">

```txt Python
```txt
+--services/
| +-- api.py
+--.env
Expand All @@ -204,7 +204,7 @@ Your project should now look like this:

<TabItem label="Go">

```txt Go
```txt
+--services/hello/
| +-- main.go
+--go.mod
Expand All @@ -218,9 +218,9 @@ Your project should now look like this:

<TabItem label="Dart">

```txt Dart
```txt
+--services/
| +-- hello.dart
| +-- api.dart
+--analysis_options.yaml
+--pubspec.lock
+--pubspec.yaml
Expand Down Expand Up @@ -270,7 +270,7 @@ Start by opening the `hello` service in your editor and adding a new route to th

<CodeSwitcher tabs>

```typescript !! title:services/hello.ts
```typescript !! title:services/api.ts
import { api } from '@nitric/sdk'

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

```javascript !! title:services/hello.js
```javascript !! title:services/api.js
import { api } from '@nitric/sdk'

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

```python !! title:services/hello.py
```python !! title:services/api.py
from nitric.resources import api
from nitric.application import Nitric

Expand Down Expand Up @@ -357,7 +357,7 @@ func main() {
}
```

```dart !! title:services/hello.dart
```dart !! title:services/api.dart
import 'package:nitric_sdk/nitric.dart';

void main() {
Expand Down
16 changes: 8 additions & 8 deletions docs/guides/dart/flutter.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ code word_generator

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.

```yaml {{ label: "nitric.yaml" }}
```yaml title:nitric.yaml
name: word_generator
services:
- match: lib/services/*.dart
Expand Down Expand Up @@ -1414,7 +1414,7 @@ nitric stack new dev aws

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

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

```yaml {{ label: "nitric.yaml" }}
```yaml title:nitric.yaml
name: word_generator
services:
- match: lib/services/*.dart
Expand All @@ -1442,7 +1442,7 @@ runtimes:

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

```dockerfile {{ label: "docker/flutter.dockerfile" }}
```dockerfile title:docker/flutter.dockerfile
FROM dart:stable AS build

# The Nitric CLI will provide the HANDLER arg with the location of our service
Expand Down Expand Up @@ -1487,7 +1487,7 @@ ENTRYPOINT ["/app/bin/main"]

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

```txt {{ label: "docker/flutter.dockerignore" }}
```txt title:docker/flutter.dockerignore
build
test

Expand All @@ -1505,15 +1505,15 @@ web
windows
```

### AWS
### Deploy

Now that the application has been configured for deployment, let's try deploying it with the `up` command.

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

Now that the application has been configured for deployment, let's try deploying it with the `up` command.

```bash
nitric up

Expand Down
Loading
Loading