Go to file
dependabot[bot] d451348d7b
Bump @typescript-eslint/eslint-plugin from 4.33.0 to 5.0.0
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 4.33.0 to 5.0.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.0.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-12 20:19:47 +00:00
.github Create dependabot.yml 2021-09-26 18:54:22 +07:00
.husky Initial commit 2021-09-16 17:23:07 +07:00
src Add cubetiq express server module for nodejs 2021-09-16 17:49:43 +07:00
.drone.yml Updated format 2021-09-16 18:17:48 +07:00
.eslintrc.js Updated format 2021-09-16 18:17:48 +07:00
.gitignore Initial commit 2021-09-16 17:23:07 +07:00
.prettierrc.json Initial commit 2021-09-16 17:23:07 +07:00
LICENSE Initial commit 2021-09-16 17:23:07 +07:00
package.json Bump @typescript-eslint/eslint-plugin from 4.33.0 to 5.0.0 2021-10-12 20:19:47 +00:00
README.md Add cubetiq express server module for nodejs 2021-09-16 17:49:43 +07:00
tsconfig.json Updated format 2021-09-16 18:17:48 +07:00

CUBETIQ Express Server

  • Express
  • TypeScript
  • Decorators

Getting Start

  • Add code into your index.ts
import "reflect-metadata"

import { createServer } from "http"
import server from "./server"

const app = server.instance
const httpServer = createServer(app)

httpServer.listen(process.env.PORT || 3000, () => {
    console.log(`Server listening on port: 3000`)
})
  • Create server.ts
import { Request, Response } from "express"
import { Application } from "./application"
import { Controller, Get } from "./decorators"

@Controller("/index")
class IndexController {
    @Get()
    public async index(req: Request, res: Response) {
        res.json({
            status: 200,
        })
    }
}

class Server extends Application {
    get controllers(): any[] {
        return [IndexController]
    }
}

export default new Server()

Contributors