Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/viandwi24/denova
a Typescript Framework For Deno - Framework Looks Like Laravel
https://github.com/viandwi24/denova
Last synced: 3 months ago
JSON representation
a Typescript Framework For Deno - Framework Looks Like Laravel
- Host: GitHub
- URL: https://github.com/viandwi24/denova
- Owner: viandwi24
- Created: 2020-05-27T23:03:18.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-06-03T12:30:45.000Z (over 4 years ago)
- Last Synced: 2023-10-20T23:40:29.402Z (over 1 year ago)
- Language: TypeScript
- Size: 87.9 KB
- Stars: 17
- Watchers: 6
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Denova
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 ^_^
## Standart Use
#### Clone a boilerplate look larave structure
```
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#### denova console
```
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
```
#### run http server
```
deno run -A --unstable -c tsconfig.json app.ts --port=3000
```#### Simple use
##### Create your main "app.ts"
```
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();
```##### Create route file `/routes.ts`
```
import {
Router
} from "https://deno.land/x/[email protected]/mod.ts";Router.get("/", () => {
return "Hello World!";
});
```##### Create config file for decorator `tsconfig.json`
```
{
"compilerOptions": {
"experimentalDecorators": true,
"emitDecoratorMetadata": true
}
}
```#### You cant run your HTTP Server with :
```
deno run -A --unstable -c tsconfig.json app.ts --port=3000
``