文件名称:typeorm:用于resty.js的TypeORM模块
文件大小:96KB
文件格式:ZIP
更新时间:2024-02-24 05:24:16
nodejs sql orm nosql typeorm
@ restyjs / typeorm import resty , { Controller , Get } from "@restyjs/core" ; import { Database } from "@restyjs/typeorm" ; @ Controller ( "/" ) class HelloController { @ Get ( "/" , [ ] ) index ( ) { return "Hello World" ; } } const app = resty ( { controllers : [ HelloController ] , providers : [ Database ( { type : "sqlite" , database : "example.db" , entities : [ ] , } ) , ] , } ) ; app . listen ( 8080 ) ;
【文件预览】:
typeorm-master
----.gitignore(2KB)
----package.json(1KB)
----.npmrc(36B)
----src()
--------errors()
--------decorators()
--------index.ts(198B)
--------connection.ts(989B)
----LICENSE(1KB)
----tsconfig.json(461B)
----.github()
--------workflows()
----README.md(434B)
----.npmignore(208B)
----test()
--------database.spec.ts(694B)
--------tsconfig.json(196B)
----yarn.lock(200KB)
----.gitpod.yml(91B)