cruky 0.7.1 copy "cruky: ^0.7.1" to clipboard
cruky: ^0.7.1 copied to clipboard

discontinuedreplaced by: croky
outdated

cruky is server-side library to create API with modern and fast performance.

example/main.dart

import 'package:cruky/cruky.dart';

void main() => run<MyApp>();

class MyApp extends ServerApp {
  @override
  List get routes => [
        exampleWithGETRequest,
      ];

  @override
  List get middlewares => [middlewareExample];
}

@Route.get('/')
exampleWithGETRequest(ReqCTX req) {
  return Json({});
}

@BeforeMW()
middlewareExample(ReqCTX req) {
  if (req.headerValue('Token') == null) {
    return Text('Not Auth', 401);
  }
}
1
likes
0
pub points
0%
popularity

Publisher

unverified uploader

cruky is server-side library to create API with modern and fast performance.

Repository (GitHub)
View/report issues

Documentation

Documentation

License

unknown (LICENSE)

Dependencies

ansicolor, args, mime, path, vm_service, watcher

More

Packages that depend on cruky