d451348d7b
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> |
||
---|---|---|
.github | ||
.husky | ||
src | ||
.drone.yml | ||
.eslintrc.js | ||
.gitignore | ||
.prettierrc.json | ||
LICENSE | ||
package.json | ||
README.md | ||
tsconfig.json |
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
- Sambo Chea sombochea@cubetiqs.com