Code Monkey home page Code Monkey logo

deno-framework's Introduction

DenoFramework - Name TBD

This workspace has been generated by Nx, a Smart, fast and extensible build system.

Getting Started

Create a deps.ts file to manage your project dependencies:

// deps.ts
export * from "@deno-framework/nests";

Create a main.ts file:

// main.ts
import { Application, createApp, Logger } from "@deno-framework/nests";

async function bootstrap() {
    const app: Application = await createApp();

    const port = 3000;
    Logger.log(`App listening at http://localhost:${ port }`, 'Bootstrap');
    await app.listen({ port });
}

bootstrap();

Create a dog.controller.ts inside a controllers folder (will be reworked to automatic discovery):

import { Controller, Get } from "@deno-framework/nests";

@Controller("/dogs")
export default class DogsController {
    @Get("/")
    getDog() {
        return { name: "Retriever", cute: true, golden: true };
    }
}

Run the app:

deno run --allow-net --allow-read --allow-env main.ts

Folder structure

.
└── app/
    ├── src/
    │   ├── controllers/
    │   │   └── dog.controller.ts
    │   └── main.ts   
    ├── deno.json
    ├── deps.ts
    └── import_map.json

TODOs

Feature State
Controller-based route registration Done ✔️
Logger Done ✔️
Providers Up next 🥇
HTTP Context Semi ⚠️
Automatic provider & controller discovery TBD
HTTP Client TBD
Middlewares TBD
Interceptors TBD
Input validation TBD
Caching TBD
Life-cycle methods TBD
MVC ?

Literature

Deno material:

Inspiration:

deno-framework's People

Contributors

drdreo avatar

Watchers

 avatar

deno-framework's Issues

Add DI

Create service constructor injection system

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.