sureshg / dart-native-sample

:dart: A sample Dart HTTPS server app compiled to native executables for Windows, Linux and MacOS.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dart2Native HTTPS & RSocket sample app

AOT compiles a Dart app to native executable for Windows, Linux and macOS using Dart2Native tool.

GitHub Workflow Status Dart Pub Version Style guide

Build

  • Install Dart SDK

    $ brew tap dart-lang/dart
    $ brew install dart
  • Build

    $ dart2native bin/main.dart -DdefaultPort=8445 -o test-server 
    
    # Running the server
    $ ./test-server --help 
    $ ./test-server -s
    $ ./test-server -l https://google.com -s

Generate X509 Cert

$ openssl req -newkey rsa:4096 \
    -new -nodes -x509 \
    -days 3650 \
    -out cert.pem \
    -keyout key.pem \
    -subj "/C=US/ST=California/L=San Jose/O=Suresh/OU=Dev/CN=localhost"

Misc

About

:dart: A sample Dart HTTPS server app compiled to native executables for Windows, Linux and MacOS.


Languages

Language:Dart 100.0%