Book Image

DART Essentials

Book Image

DART Essentials

Overview of this book

Table of Contents (16 chapters)
Dart Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 7. Server-side Applications with Dart

In this chapter, we'll take a look at developing command-line server-side apps. In particular, we'll learn the following topics:

  • How to process command-line arguments with the args package

  • Writing a small chat app with a WebSockets server in Dart

  • How to access filesystem with the dart:io library

  • Storing data to the MySQL database with the sqljocky package

  • Writing a small web server using the route package

  • How to use Apache and nginx servers as reverse proxies for Dart HTTP servers

This chapter assumes that you already have at least basic experience with CLI scripts or Unix environments in general. If you're a Windows user, take a look at Cygwin (www.cygwin.com), which is a Unix-like environment for Windows, or ideally, install Ubuntu into a virtual machine. The Dart SDK is now available for Debian and Ubuntu Linux distributions, while Dart Editor is currently available only for Ubuntu Linux.

We'll set off with a few notes about Dart VM and then go to...