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

outdated

Logic to reflect Jaguar Controllers into Jaguar routes. Also provides reflection support for Jaguar Bingings

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

Logic to reflect Jaguar Controllers into Jaguar routes. Also provides reflection support for Jaguar Bingings

Homepage

License

unknown (LICENSE)

Dependencies

jaguar, meta

More

Packages that depend on jaguar_reflect