jaguar_reflect 2.4.1 copy "jaguar_reflect: ^2.4.1" to clipboard
jaguar_reflect: ^2.4.1 copied to clipboard

outdated

Reflection based alternative for Jaguar

jaguar_reflect #

Uses reflection instead of source generation to serve Jaguar Api classes.

Usage #

A simple usage example:

final book = new Book.make('0', 'Book1', ['Author1', 'Author2']);

@Api(path: '/api/book')
class BooksApi {
  @Get()
  Response<String> addBook(Context ctx) => Response.json(book.toMap());
}

Future<Null> main(List<String> args) async {
  final jaguar = new Jaguar(port: 8005);
  jaguar.addApi(reflect(new BooksApi()));
  await jaguar.serve();
}
1
likes
0
pub points
0%
popularity

Publisher

unverified uploader

Reflection based alternative for Jaguar

Homepage

License

unknown (LICENSE)

Dependencies

jaguar

More

Packages that depend on jaguar_reflect