Code Monkey home page Code Monkey logo

mildronize / mildjs Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 1.32 MB

(Moved to https://github.com/mildjs/mild) A simple library for creating structured and organized controller and service with class-based design. It also provides basic decorators usage in Express using Typescript

Home Page: https://mildronize.github.io/mildjs/

TypeScript 95.33% JavaScript 4.67%
router express-router controllers providers modules services web-framework typescript express decorators

mildjs's Introduction

MildJS


Moved repo to mildjs/mild




A simple library for creating structured and organized controllers and services with class-based design. It also provides basic decorators usage in Express using Typescript

Philosophy: Provide tools for creating lightweight framework for Express app. To be easy to integrate with any kind of dependency injection tools, any service providers.

However, it focus on low dependency as much as possible. The tools should help to define the stucture of code for testing purpose, but also flexible for add other tools.

Inspiration from: Nestjs, Routing Controllers, OvernightJS


Features

  • Express Router decorators: Get, Post, Put, Delete, Use, Controller
  • Express Middleware
    • Use for Express Middleware
    • Support multiple middleware, e.g. @Use(validateAuth, validateRole) (validateAuth, validateRole is the custom middlewares)
  • Basic HttpException
  • Basic middleware for validating the request, validateType using class-validator
  • built-in http-status-codes

mildjs's People

Contributors

dependabot[bot] avatar mildronize avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

mildjs's Issues

The router path without splash doesn't work

I found the problem on version 1.3.1, with @Controller and @Get (including Http methods)

the user must use like this

@Controller('/auth')
export class AuthController {

  @Post('/signup')
  signup(){}
}

it should be

@Controller('auth')
export class AuthController {

  @Post('signup')
  signup(){}
}

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.