mid 0.0.3 copy "mid: ^0.0.3" to clipboard
mid: ^0.0.3 copied to clipboard

outdated

a tool for building an end-to-end typesafe APIs in pure dart

example/README.md

Quick Start Tutorial #

This is a quick start tutorial that's meant to show how mid works.

  1. Install mid if you haven't:

    dart pub global activate mid
    
  2. Create a mid project:

    mid create quick_start
    

    This will create two dart projects in the following structure:

    quick_start
        |- quick_start_client
        |- quick_start_server
    
  3. Open the project in your favorite IDE:

    code quick_start
    
  4. Head to quick_start_server/lib/mid/endpoints.dart file:

    a. remove existing code.

    b. then paste the following:

       
    // TODO: put endpoints here
    
  5. Generate the server and client code:

    mid generate all
    
  6. Head to quick_start_client/bin/ and create frontend.dart:

    Assume this file is your frontend project. Paste the following there:

    // TODO: put client code
    
  7. Run the frontend app (assuming you're still within quick_start directory):

    dart run quick_start_client/bin/frontend.dart
    

    This should print the following:

    file an issue if it doesn't 😅

6
likes
0
pub points
0%
popularity

Publisher

verified publisherosaxma.com

a tool for building an end-to-end typesafe APIs in pure dart

Homepage

License

unknown (license)

Dependencies

analyzer, args, built_collection, cli_util, code_builder, dart_style, meta, path

More

Packages that depend on mid