open-index/open-npm huggingface dataset:
npm package: @sen.he/express-decorate
Description: express route decorators
Author: sen.he
Latest version: 0.1.1

# install

`npm install @sen.he/express-decorate`


# Example

/controller/test.ts

```TypeScript
import { GET, Path, POST, DELETE, PUT, SuccessResponse, ErrorResponse } from "@sen.he/express-decorate";
import { Request, Response, NextFunction } from "express";

@Path("/users")
export default class Test {

  @GET("/index", [(req: Request, res: Response, next: NextFunction) => {
    console.log("index middware");
    next();
  }])
  public index(req: Request, res: Response, next: NextFunction) {
    next(new SuccessResponse({ msg: "Ok" }, 2001));
  }

  @DELETE("/name")
  @PUT("/update")
  @POST("/:id")
  @GET("/:id")
  public getUser(req: Request, res: Response, next: NextFunction) {
    next(new ErrorResponse("not found", 404));
  }

  @POST("/")
  public addUser(req: Request, res: Response, next: NextFunction) {
    next(new SuccessResponse({ id: req.body.id }));
  }

  @PUT("/:id")
  public updateUser(req: Request, res: Response, next: NextFunction) {
    next(new SuccessResponse({ id: req.params["id"] }));
  }

  @DELETE("/:id")
  public deleteUser(req: Request, res: Response, next: NextFunction) {
    next(new SuccessResponse({ id: req.params["id"] }));
  }
}

```

/route/v2.ts
```TypeScript
import express from "express";

import { registerRoutes } from "@sen.he/express-decorate";

import Test from "../controller/test";

const router: any = express.Router();

// GET /v2/users/index
registerRoutes(router, [Test], "/v2", [(req: any, res: any, next: any) => {
  console.log("router middware");
  next();
}]);

export default router;
```
npm package: @senaiplay/schematics
Description: A blank schematics
Latest version: 0.0.0


# Schematics

Gere modulos e modais com apenas um comando!
## Instalação


```bash
  npm install -g @angular-devkit/schematics-cli
  npm run schematics:install
  npm run schematics:build
```
    
## Documentação dos schematics

#### Gera um novo módulo com padrões do projeto admin

```http
  ng g ./schematics:admin-module --path=YOURPATH --name=MODULE-NAME
```

| Parâmetro   | Descrição                           |
| :---------- |:---------------------------------- |
| `admin-module` | **Módulo para uso na plataforma admin**. |

#### Gera um novo modal com padrões do projeto admin

```http
  ng g ./schematics:admin-modal --path=YOURPATH --name=MODAL-NAME
```

| Parâmetro   | Descrição                           |
| :---------- |:---------------------------------- |
| `admin-modal` | **Modal para uso na plataforma admin**. |

#### Gera um novo módulo com padrões do projeto student

```http
  ng g ./schematics:student-module --path=YOURPATH --name=MODULE-NAME
```

| Parâmetro   | Descrição                           |
| :---------- |:---------------------------------- |
| `student-module` | **Módulo para uso na plataforma student**. |


#### Gera um novo modal com padrões do projeto student

```http
  ng g ./schematics:student-modal --path=YOURPATH --name=MODULE-NAME
```

| Parâmetro   | Descrição                           |
| :---------- |:---------------------------------- |
| `student-modal` | **Modal para uso na plataforma student**. |