Giter VIP home page Giter VIP logo

cli's Introduction

Alosaur πŸ¦–

Alosaur - Deno web framework πŸ¦–.

Documentation

test sponsors

  • Area - these are the modules of your application.
  • Controller - are responsible for controlling the flow of the application execution.
  • Middleware - provide a convenient mechanism for filtering HTTP requests entering your application.
  • Hooks - middleware for area, controller and actions with support DI. Have 3 life cyclic functions: onPreAction, onPostAction, onCatchAction
  • Decorators - ES decorators for query, cookie, parametrs, routes and etc.
  • Dependency Injection - for all controllers and hooks by default.
  • Security - supports security context (Session, Authentication, Authorization, OAuth, Google and custom strategy) Security
  • Render pages any template render engine. (more)

δΈ­ζ–‡θ―΄ζ˜Ž

How do I use Alosaur in Deno Deploy? Use the light version of Alosaur: Alosaur Lite


Simple example

app.ts:

import { App, Area, Controller, Get } from "https://deno.land/x/alosaur/mod.ts";

@Controller() // or specific path @Controller("/home")
export class HomeController {
  @Get() // or specific path @Get("/hello")
  text() {
    return "Hello world";
  }
}

// Declare module
@Area({
  controllers: [HomeController],
})
export class HomeArea {}

// Create alosaur application
const app = new App({
  areas: [HomeArea],
});

app.listen();

And run

deno run --allow-net app.ts

More examples

Sponsors

Backers

cli's People

Contributors

borisliu avatar btd1337 avatar irustm avatar nightowl07 avatar silvioprog avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

cli's Issues

what is alosaur.json use for?

Can i ask what does alosaur.json do?

I've noticed in the generator you have alosaur.json but wondering what the purpose of it was? I guess if you generate multiple "apps", you going to want to stack it a bit like angular.cli or nx workspace.json or am I completely wrong?

Referencing alosaur/alosaur#66 about custom DI. I think the CLI would go to be a full wrapper around Deno, including running, so it's self-executing. After much research looks like Deno does support transpiler, so I was thinking to add it as a CLI support, so it has an AST compile and runs the compiled code instead. This way alosaur can add transformer support without it being an issue (for them that want too) Not sure if this takes away from what you were thinking though

Suggested change:

 {
   "apps": [
     {
       "name": "example-app",
       "permissions": [ "--allow-net", "--allow-read" ]
     }
   ]
 }

That way you can have:

deno run --allow-read --allow-write --allow-net cli.ts run example-app

Replace the scaffolded `tsconfig.json` with `deno.jsonc`

Hi,

I'm setting up a test project with Alosaur to find the Deno equivalent of a Nest.js stack.

When using the CLI, a tsconfig.json is generated. After a quick check with the official documentation, it appears deno.json and deno.jsonc are the default since v1.18 (release notes). Can this be updated?

If you prefer for me to create a pull request, feel free to ask.

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.