Dart Frog WebSocket은 Dart Frog(경량이고 고성능인 Dart용 백엔드 프레임워크)에 WebSocket 통합을 제공하는 패키지입니다. 클라이언트와 서버 간 실시간 양방향 통신을 가능하게 하며, 채팅 앱, 협업 도구 또는 실시간 대시보드와 같은 실시간 업데이트가 필요한 애플리케이션에 적합합니다. 이 패키지는 최소한의 보일러플레이트로 Dart Frog의 라우팅 및 미들웨어 시스템을 자연스럽게 확장하여 WebSocket 연결을 처리합니다. 메시지 브로드캐스트, 연결 관리, 이벤트 기반 프로그래밍 패턴을 지원합니다. 성능과 단순성을 위해 설계되어 Dart Frog의 모듈형 아키텍처에 자연스럽게 통합됩니다.
In order to use Dart Frog you must have the Dart SDK installed on your machine.
Installing 🧑💻
# 📦 Install the dart_frog cli from pub.dev
dart pub global activate dart_frog_cli
Creating a Project ✨
Use the dart_frog create command to create a new project.
# 🚀 Create a new project called "my_project"
dart_frog create my_project
Start the Dev Server 🏁
Next, open the newly created project and start the dev server via:
# 🏁 Start the dev server
dart_frog dev
💡 Tip: By default port 8080 is used. A custom port can be used via the --port option.
Create a Production Build 📦
Create a production build which includes a DockerFile so that you can deploy anywhere:
# 📦 Create a production build
dart_frog build
Create New Routes and Middleware 🛣️
To add new routes and middleware to your project, use the dart_frog new command.
# 🛣️ Create a new route "/hello/world"
dart_frog new route "/hello/world"# 🛣️ Create a new middleware for the route "/hello/world"
dart_frog new middleware "/hello/world"
The goal of Dart Frog is to help developers effectively build backends in Dart. Currently, Dart Frog is focused on optimizing the process of building backends which aggregate, compose, and normalize data from multiple sources.
Dart Frog provides a simple core with a small API surface area in order to reduce the learning curve and ramp-up time for developers. In addition, Dart Frog is intended to help Flutter/Dart developers maximize their productivity by having a unified tech stack that enables sharing tooling, models, and more!
Extensions 💻
VSCode: extends VSCode with support for Dart Frog and provides tools for effectively managing Dart Frog projects within VSCode.