We will be building a starter kit for single page applications. This will have a server and client side component, incorporating a Static File server and an Api Server. We will use the dart tool to generate a console-based project. We will add the shelf and shelf_static dependencies. We will create a shelf web server and implement the relevant routes to serve our static files and api resources. We will add request logging behaviour through the middleware functionality, including support for Cross Origin Resource Sharing (CORS). We will complete this part by adding an api test.
=== Contents of this video ===
00:00 Intro
00:24 Generate Dart console-full project with package dependencies
01:21 Create shelf web server
02:12 Implement “catch-all” route for static index.html file
04:00 Implement our static-file server
05:31 Implement our UserApi Server
07:38 Add request logging middleware function
08:34 Add Cross Origin Resource Sharing (CORS) support
11:45 Implement api tests
13:04 Outro
Please leave us your feedback in the comments, and let us know what you would like us to demonstrate next! You can reach out in the comments below or on Twitter using #FullstackDart #Dartlang #DartStarterKit #Flutter
Like, Subscribe and Hit the Bell 🔔 if you enjoyed this video 😍
Get the source code → https://github.com/graphicbeacon/dart...
Get started with Dart course → https://bit.ly/getstartedwithdart
Cross-Origin Resource Sharing (CORS) → https://developer.mozilla.org/en-US/d...
Dart docs → https://dart.dev
Subscribe to the channel → http://bit.ly/2P2N1jC
Read More Dart Tutorials → https://creativebracket.com
Buy me a coffee → https://ko-fi.com/creativebracket
LET'S CONNECT
---
Twitter → / creativ_bracket
Support the channel → / creativebracket