A server app built using Shelf, configured to enable running with Docker

Overview

A server app built using Shelf, configured to enable running with Docker.

This sample code handles HTTP GET requests to / and /echo/<message>

Requests Overview

This sample code handles following requests:

GET

  • /todos - this request will fetch all the availabel todos in the list.
  • /todo/<id> -this request will fetch Todo according to id that was parsed

POST

  • /add-todo - this request will add new Todo to the list, with JSON body that was attached.

DELETE

  • delete-todo/<id> - this request will delete Todo according to id that was parsed.

PUT

  • update-todo - this request will update and replace the Todo with same id.

Project Structure

todo_server_pj_structure

Running the sample

Running with the Dart SDK

You can run the example with the Dart SDK like this:

$ dart run bin/server.dart
Server listening on port 8080

And then from a second terminal:

$ curl http://0.0.0.0:8080
Hello, World!
$ curl http://0.0.0.0:8080/echo/I_love_Dart
I_love_Dart

Running with Docker

If you have Docker Desktop installed, you can build and run with the docker command:

$ docker build . -t myserver
$ docker run -it -p 8080:8080 myserver
Server listening on port 8080

And then from a second terminal:

$ curl http://0.0.0.0:8080
Hello, World!
$ curl http://0.0.0.0:8080/echo/I_love_Dart
I_love_Dart

You should see the logging printed in the first terminal:

2021-05-06T15:47:04.620417  0:00:00.000158 GET     [200] /
2021-05-06T15:47:08.392928  0:00:00.001216 GET     [200] /echo/I_love_Dart
You might also like...

Docker images for the Dart programming language (https://dart.dev)

dart-docker This is the Git repo of the Docker "Official Images" for the Dart programming language. See the Docker Hub page for a full description on

Dec 14, 2022

The one and only Docker Tool you will ever need again

# container_tool A new Flutter project. ## Getting Started This project is a starting point for a Flutter application. A few resources to get you

Nov 17, 2021

Remote Flutter/Dart Compiler for CloudRun and Docker

flutter_remote_compiler Running the Application Locally Run aqueduct serve from this directory to run the application. For running within an IDE, run

Dec 12, 2022

Create dart data classes easily, fast and without writing boilerplate or running code generation.

Create dart data classes easily, fast and without writing boilerplate or running code generation.

Dart Data Class Generator Create dart data classes easily, fast and without writing boilerplate or running code generation. Features The generator can

Feb 28, 2022

Proof of concept of Flutter running on CarPlay

Proof of concept of Flutter running on CarPlay

CarPlay Flutter Widgets What is this? This is a proof of concept of a Flutter based app running on Apple CarPlay app. What can I use it for? You can u

Apr 9, 2022

A Flutter application running on mobile, web and desktop. Stay tuned to see who will win the stars race!

A Flutter application running on mobile, web and desktop. Stay tuned to see who will win the stars race!

The live stars race Access this project running at jhbitencourt.github.io/stars-race An app running on mobile, web and desktop. How long do you think

Jul 20, 2022

Tribally SDKs enable your users to create communities and bring in more people to talk about the things they love.

tribally Tribally SDKs enable your users to create communities and bring in more people to talk about the things they love. Getting Started This proje

Dec 28, 2021

A script to disable and re-enable CORS checks for Flutter's Chrome instance

A script to disable and re-enable CORS checks for Flutter's Chrome instance Note This script only disables CORS checks for local testing, and will not

Nov 15, 2022

Awesome Notifications add-on plugin to enable push notifications through Firebase Cloud Messaging with all awesome notifications features.

Awesome Notifications add-on plugin to enable push notifications through Firebase Cloud Messaging with all awesome notifications features.

Awesome Notifications FCM Awesome Notifications add-on to send push notifications using FCM (Firebase Cloud Messaging), with all awesome notifications

Jan 4, 2023
Owner
Tornike Gogberashvili
Software Engineer. Passionate for cross-platform app development. Learn something new every day and improve old by practice. ✌️
Tornike Gogberashvili
Buildpack dart - A server app built using Shelf, configured to enable running with Docker

Hosted at https://dart-buildpack-demo-ruyjilv5wq-uc.a.run.app/ Buildpack defined

Kevin Moore 12 Dec 15, 2022
A server app built using Shelf, configured to enable running with Docker.

A server app built using Shelf, configured to enable running with Docker.

RAHUL SHARMA 1 May 23, 2022
Dart-com-Shelf - Web server básico feito com dart e shelf, configurações de rotas e conexão com mysql.

A server app built using Shelf, configured to enable running with Docker. This sample code handles HTTP GET requests to / and /echo/<message> Running

Luanzera07 0 Jan 3, 2022
Appwrite is a secure end-to-end backend server for Web, Mobile, and Flutter developers that is packaged as a set of Docker containers for easy deployment 🚀

A complete backend solution for your [Flutter / Vue / Angular / React / iOS / Android / *ANY OTHER*] app Appwrite 0.12 has been released! Learn what's

Appwrite 28.2k Jan 3, 2023
Working proof of the Go (golang) server running inside Flutter

flap Working proof of the Go server running inside Flutter Video in action Prerequisites Flutter >2.0 Go >1.16 Build Go server cd go macOS: make maco

Err 28 Dec 17, 2022
The Integration Test Helper has pre-configured methods that allow for faster test deployment for end to end (e2e) test coverage.

The Integration Test Helper has pre-configured methods that allow for faster test deployment for end to end (e2e) test coverage (using Android and iOS

The Mobile Applications Community 2 Apr 7, 2022
A dart timer that can be configured to fire once or repeatedly with ability start, stop, resume and cancel.

A timer that can be configured to fire once or repeatedly with ability start, stop, resume and cancel. Getting started Add CompleteTimer to your pubsp

MohammadAminZamani.afshar 3 Jul 20, 2022
Dart Web API Template Using Google Shelf Framework and Postgres Drivers, read readme to learn how to use

Shelf Web Framework Template by Alex Merced of AlexMercedCoder.com Cloning the Template git clone https://github.com/AlexMercedCoder/DartShelfPostgres

Alex Merced 16 Dec 26, 2022
A simple web API to generate images from a url, made using shelf package.

Webshot API Yet another simple webshot API but written in dart and built using Shelf library to generate images from url. This is really useful for li

wrench 15 Oct 19, 2022
Flutterbodydetection - A flutter plugin that uses MLKit on iOS/Android platforms to enable body pose and mask detection using Pose Detection and Selfie Segmentation APIs for both static images and live camera stream.

body_detection A flutter plugin that uses MLKit on iOS/Android platforms to enable body pose and mask detection using Pose Detection and Selfie Segmen

null 18 Dec 5, 2022