Go to file
dependabot[bot] cf661b7e03
Bump eslint-plugin-jsdoc from 36.1.1 to 37.0.3
Bumps [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) from 36.1.1 to 37.0.3.
- [Release notes](https://github.com/gajus/eslint-plugin-jsdoc/releases)
- [Commits](https://github.com/gajus/eslint-plugin-jsdoc/compare/v36.1.1...v37.0.3)

---
updated-dependencies:
- dependency-name: eslint-plugin-jsdoc
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-26 20:25:07 +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 eslint-plugin-jsdoc from 36.1.1 to 37.0.3 2021-10-26 20:25:07 +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