@restyjs/typeorm

TypeORM module for resty.js

Usage no npm install needed!

<script type="module">
  import restyjsTypeorm from 'https://cdn.skypack.dev/@restyjs/typeorm';
</script>

README

@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);