Skip to content
This repository was archived by the owner on Apr 7, 2026. 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
1 change: 1 addition & 0 deletions melos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ packages:
- "*"
- "packages/*"
- "examples/*"
- "templates/*"

command:
version:
Expand Down
12 changes: 12 additions & 0 deletions templates/crud_rest_api_dartfrog/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.DS_Store
node_modules/
npm-debug.log
dist/
.vscode/
.wrangler
.nvim.lua
.idea
*.iml
.dart_tool
.fvm
.dart_frog
3 changes: 3 additions & 0 deletions templates/crud_rest_api_dartfrog/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# 0.1.0+1

- TODO: Describe initial release.
1 change: 1 addition & 0 deletions templates/crud_rest_api_dartfrog/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This project is licensed under the MIT License - Copyright Globe.dev
74 changes: 74 additions & 0 deletions templates/crud_rest_api_dartfrog/TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
---
name: Simple DartFrog Server
description: Building a simple CRUD REST API backend with DartFrog
tags: ["dart", "dartfrog", "globe"]
username: Invertase
---

# Simple DartFrog Server

## Overview

Creating a simple CRUD REST API server. This template helps you to save time to scaffold your Dart backend with DartFrog as quickly as possible.

### Getting Started

#### Bootstrap

Initialize your project using the command below

```shell
$ globe create -t crud_rest_api_dartfrog
```

#### Start Server

```shell
$ dart_frog dev --port=3000
```

### REST Endpoints

- List Repositories

```shell
curl --request GET --url http://localhost:3000/repos
```

```json
[
{ "id": 0, "name": "serverpod", "url": "github.com/serverpod/serverpod" },
{ "id": 1, "name": "melos", "url": "github.com/invertase/melos" },
{ "id": 2, "name": "freezed", "url": "github.com/rrousselGit/freezed" }
]
```

- Create New Repository

```shell
curl -X POST -H "Content-Type: application/json" -d '{"name": "java", "url": "java.com/env"}' http://localhost:3000/repos
```

```json
{ "id": 3, "name": "java", "url": "java.com/env" }
```

- Update Repository

```shell
curl -X PUT -H "Content-Type: application/json" -d '{"name": "dart", "url": "dart.dev"}' http://localhost:3000/repos/3
```

```json
{ "id": 3, "name": "dart", "url": "dart.dev" }
```

- Delete Repository for user

```shell
curl --request DELETE http://localhost:3000/repos/2
```

```json
{ "message": "Repo 2 successfully deleted." }
```
5 changes: 5 additions & 0 deletions templates/crud_rest_api_dartfrog/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include: package:lints/recommended.yaml

linter:
rules:
file_names: false
Loading