a Typescript Framework For Deno - Framework Looks Like Laravel
A Typescript Framework For Deno - Framework Looks Like Laravel
| See docs in : https://viandwi24.github.io/denova
| or : https://deno.land/x/[email protected]/docs/README.md
| A Documentation and Readme will be updated gradually, please wait ^_^
git clone https://github.com/viandwi24/denova-project
cd denova-project
or you can see in https://deno.land/x/[email protected]/example
for same boilerplate
deno run -A --unstable -c tsconfig.json denova.ts version
deno run -A --unstable -c tsconfig.json denova.ts name
deno run -A --unstable -c tsconfig.json denova.ts route:list
deno run -A --unstable -c tsconfig.json app.ts --port=3000
import {
Application,
HTTPKernel
} from "https://deno.land/x/[email protected]/mod.ts";
// create container
const app = new Application();
let root = this.app.make('denova.path');
// bind a service and variable
app.bind('denova.path', root);
app.bind(HTTPKernel);
// define routes
await Router.group({}, `${root}/routes/web.ts`);
// http server
const request = app.make(HTTPKernel);
request.capture();
/routes.ts
import {
Router
} from "https://deno.land/x/[email protected]/mod.ts";
Router.get("/", () => {
return "Hello World!";
});
tsconfig.json
{
"compilerOptions": {
"experimentalDecorators": true,
"emitDecoratorMetadata": true
}
}
deno run -A --unstable -c tsconfig.json app.ts --port=3000
``