A web framework for Deno. Simple, Easy && Cool

A web framework for Deno. Simple, Easy && Cool

Dinar A web framework for Deno. Simple, Easy && Cool

Dinar

A web framework for Deno. Simple, Easy && Cool;

Quick Start

const Application = await Dinar.createApplication({ port: 8080 });

// create a controller(just a router)
@Controller()
export class HomeController {
  // create a get method
  @Get()
  helloWorld() {
    return "hello dianr";
  }
}

Application.run();

// visite http://localhost:8080 and you will see `hello dinar` in your broswer!

Router

we use Controller and other request methods decorator as router map

// visite http://localhost:8080/home/index and you can see `this is index home`
@Controller("home")
export class HomeController {
  @Get("index")
  inde() {
    return "this is index home";
  }
}

Service

Auto Dependency Inject

unlike Module in nest or Area in alosaur,you do not need to write any unnessuary import class or config statement,

just wirte you controller, we will help you to inject anything you need

// CatController.ts
import { CatService } from "./CatService.ts";
@Controller("cat")
export class CatController {
  contructor(private cs: CatService) {}
  @Get("list")
  async list() {
    return await this.cs.getList();
  }
}

// CatService.ts
@Service()
export class CatService {
  async getList() {
    return await some_database_query("sql");
  }
}

just this !

you do not write those module file that make you puzzled,

cookie and session are mean state in Dinar.

so we provide you a base state class named Stateful,

use it as follow

// cookie example, if you are not use Stateful,you would not get cookie
@Controller()
export class Home extends Stateful {
  @Get()
  index() {
    return this.cookie.name ?? "unlogin";
  }
  @Get("login")
  login() {
    this.cookie = {
      name: "dinar",
    };
    return "success";
  }
}

Download Details:

Author: kyaruary

GitHub: https://github.com/kyaruary/denarius

nodejs node javascript deno

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Javascript module for easily generating mazes,compatible with both Deno and Node

A work-in-progress Javascript maze generator module, compatible with both Deno and Node.

What is Deno? The Node.JS Killer? The Deno-minator to Node?

What is Deno? The Node.JS Killer? The Deno-minator to Node? Deno is the new hype and will it be better than node.js? Deno is a secure runtime for JavaScript and TypeScript that is based on the V8 JavaScript engine and the Rust programming language that addresses Node’s shortcomings

What is Deno and is Node.js Dying? | Deno vs Node

What is Deno? Deno vs Node. Is Node.js going to die? Deno is a runtime for JavaScript and TypeScript that is based on the V8 JavaScript engine and the Rust programming language. It was created by Ryan Dahl, original creator of Node.js, and is focused on productivity. It was announced by Dahl in 2018 during his talk "10 Things I Regret About Node.js"

Deno - How to Compile & Run Javascript Code in Deno Runtime

Learn How to Compile & Run Javascript Code in Deno Runtime.

Deno vs. Node: A Good Crisp Difference Between Node and Deno

Deno vs. Node: A Good Crisp Difference Between Node and Deno - Here is a basic tutorial on a crisp difference between Nodejs and Deno. Before starting with Deno it good to understand what problem deno solves.