Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.
/ dart-native-sample Public archive

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

Notifications You must be signed in to change notification settings

sureshg/dart-native-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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