kola 0.1.12 kola: ^0.1.12 copied to clipboard
An agile MVC backend framework for rapid and scalable development of high-performance web applications.
import 'package:kola/kola.dart';
void main() async {
final server = Server(8080, 'localhost');
server.register([
Route.get(
'/param/:id/value/:name',
(req, res) {
var id = req.params['id'];
var name = req.params['name'];
res.ok('id: $id, name: $name');
},
),
Route.get(
'/user/:id',
(req, res) {
var id = req.params['id'];
res.ok(id);
},
)
]);
await server.start();
}