Skip to content

Examples showcasing dart server stack with shelf, shelf router, and webdev.

Notifications You must be signed in to change notification settings

Sameerkash/Dart-ServerStack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dart Server Stack ✨🎯 🔨

Sample code showcasing usuag of Dart server stack using shelf, shelf_router and webdev.

Table of Contents

Flutter Conferences

All Flutter COnferences in one place! This code showcases building a webapp which serves html using mustache templating engine and scss. It uses the shelf package to serve files using Pipeline() and Cascade() classes using Middlewares.

conf conf

My Pubdev

A personalized clone of pubdev which displays a list of packages fetched from backend. This was built using the webdev package and uses dart to manipulate the DOM once packages are fetched from the server.

conf

Pub API

this project mimics the pub api for fetching packages, it implements appropriate routes using shelf_router package and responds with JSON data from a file using the hosted pub repository specification.

API Endpoints

Route Description Method
/api/ Test endpoint GET
/api/packages/ Get all packages GET
/api/package/ Add a new package POST
/api/package/< name> Get a package GET
/api/package/< name> Delete a package DELETE

Checklist

  • Server using shelf
  • Server using shelf_router with API endpoints
  • Serve static files
  • Use mustache templating engine
  • Compile dart to js using webdev for Client side
  • CSS styling using SCSS
  • API headers using pub hosted specification
  • Add Tests to shelf_router_example

Run Locally

  • Clone the repository

  • Ensure Dart SDK is installed

  • dart pub get inside each folder

  • Run by either running

    dart bin/server.dart

    or

    nodemon exec
  • for running webdev_example,

    dart pub global install webdev

    and then

    webdev serve

About

Examples showcasing dart server stack with shelf, shelf router, and webdev.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published