- This is in responce to this ticket: ecosystem: Add a caddy plugin to serve static files from Minio server. · Issue #3161 · minio/minio
- See also the same setup for Nginx by @harshavardhana
- Note: caddy can't errors from reverse proxy (i.e. 404, 500, etc) as of v0.11.1
- see ticket for more info.
| import 'dart:async'; | |
| import 'dart:ffi'; | |
| import 'dart:io'; | |
| import 'dart:math'; | |
| import 'package:moor/backends.dart'; | |
| import 'package:moor/moor.dart'; | |
| import 'package:moor_ffi/moor_ffi.dart'; | |
| import 'package:moor_ffi/open_helper.dart'; |
| import 'dart:async'; | |
| import 'package:flutter/material.dart'; | |
| import 'package:bloc/bloc.dart'; | |
| import 'package:flutter_bloc/flutter_bloc.dart'; | |
| import 'package:meta/meta.dart'; | |
| import 'package:geolocator/geolocator.dart'; | |
| void main() => runApp(MyApp()); |
| /* | |
| * I'm sure there's a better way to do this, but this solution works for me. | |
| * Recursively copies a directory + subdirectories into a target directory. | |
| * There's also no error handling. Have fun. | |
| */ | |
| import 'dart:io'; | |
| import 'package:path/path.dart' as path; | |
| Future<void> copyDirectory(Directory source, Directory destination) async { |
Hey everyone - this is not just a one off thing, there are likely to be many other modules in your dependency trees that are now a burden to their authors. I didn't create this code for altruistic motivations, I created it for fun. I was learning, and learning is fun. I gave it away because it was easy to do so, and because sharing helps learning too. I think most of the small modules on npm were created for reasons like this. However, that was a long time ago. I've since moved on from this module and moved on from that thing too and in the process of moving on from that as well. I've written way better modules than this, the internet just hasn't fully caught up.
@broros
otherwise why would he hand over a popular package to a stranger?
If it's not fun anymore, you get literally nothing from maintaining a popular package.
One time, I was working as a dishwasher in a restu
| import 'dart:async'; | |
| import 'package:flutter/material.dart'; | |
| import 'package:bloc/bloc.dart'; | |
| import 'package:flutter_bloc/flutter_bloc.dart'; | |
| void main() => runApp(MyApp()); | |
| class MyApp extends StatelessWidget { |
| brew install caddy mkcert nss dnsmasq | |
| mkcert -install | |
| mkcert '*.app.test' '*.cdn.test' | |
| # rename the certs and move them under /usr/local/etc/caddy/certs | |
| cat <<EOF > /usr/local/etc/caddy/Caddyfile | |
| *.app.test:443, *.cdn.test:443 { |
It's relatively easy to scale out stateless web applications. You often only need a reverse proxy. But for those stateful web applications, especially those applications that embeds websocket services in them, it's always a pain to distribute them in a cluster. The traditional way is introducing some external services like Redis to handle pubsub, however, in such way, you often need to change your code. Can Erlang/Elixir, the "concurrency oriented programming languages", best other languages in this use case? Has Phoenix framework already integrated the solution of horizontally scaling websocket? I'll do an experiment to prove (or disprove) that.
| type socket | |
| type event | |
| type config = { | |
| reconnect: bool; | |
| debug: bool; | |
| timeout: int; | |
| interval: int | |
| } |