Skip to content

Instantly share code, notes, and snippets.

@uno-de-piera
Last active June 12, 2020 04:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save uno-de-piera/4ceaad03fb5a89c2cedbb3574b4fccef to your computer and use it in GitHub Desktop.
Save uno-de-piera/4ceaad03fb5a89c2cedbb3574b4fccef to your computer and use it in GitHub Desktop.
import { Controller, Get, View } from "https://deno.land/x/alosaur/mod.ts";
import {UserService} from "../../services/UserService.ts";
@Controller('/home')
export class HomeController {
constructor(private service: UserService) {}
@Get('/')
async index() {
const users = await this.service.getUsers();
return View('index', { users });
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment