I'm working on a #poc in plain #nodejs 馃憖
Not published yet, put maybe I will fight #nestjs as a competitor 馃

This is already working AND fully written in #es2025 #esm with #tc39 decorator proposal

What do you think?

```ts
const cats: Cat[] = [
  new Cat({ id: "1aefd497-bb47-47e3-b160-cb69c5ba0ff4", name: "Kami", age: 4 }),
];

@Path("/cats")
export class CatController {
  @Get
  @Path("/")
  public list(): Cat[] {
    return cats;
  }

  @Get
  @Path("/:id")
  public getById(@PathVariable() id: UUID): Cat | null {
    return cats.find((cat) => cat.id === id) ?? null;
  }

  @Post
  @Path("/")
  public create(@RequestBody(Cat) cat: Cat): Cat {
    cat.id = randomUUID();
    cats.push(cat);
    return cat;
  }

  @Put
  @Path("/:id")
  public update(@PathVariable() id: UUID, @RequestBody(Cat) cat: Cat): Cat {
    const index = cats.findIndex((c) => c.id === id);
    if (index === -1) {
      throw new NotFoundResponseError("Cat not found");
    }
    cats[index] = cat;
    return cat;
  }

  @Delete
  @Path("/:id")
  public delete(@PathVariable() id: UUID): void {
    const index = cats.findIndex((c) => c.id === id);
    if (index === -1) {
      throw new NotFoundResponseError("Cat not found");
    }
    cats.splice(index, 1);
  }
}
```
```ts const cats: Cat[] = [ new Cat({ id: "1aefd497-bb47-47e3-b160-cb69c5ba0ff4", name: "Kami", age: 4 }), ]; @Path("/cats") export class CatController { @Get @Path("/") public list(): Cat[] { return cats; } @Get @Path("/:id") public getById(@PathVariable() id: UUID): Cat | null { return cats.find((cat) => cat.id === id) ?? null; } @Post @Path("/") public create(@RequestBody(Cat) cat: Cat): Cat { cat.id = randomUUID(); cats.push(cat); return cat; } @Put @Path("/:id") public update(@PathVariable() id: UUID, @RequestBody(Cat) cat: Cat): Cat { const index = cats.findIndex((c) => c.id === id); if (index === -1) { throw new NotFoundResponseError("Cat not found"); } cats[index] = cat; return cat; } @Delete @Path("/:id") public delete(@PathVariable() id: UUID): void { const index = cats.findIndex((c) => c.id === id); if (index === -1) { throw new NotFoundResponseError("Cat not found"); } cats.splice(index, 1); } } ```
Alex, the Hearth Fire
Micha艂 "rysiek" Wo藕niak 路 馃嚭馃嚘
Alex, the Hearth Fire and 1 other boosted

Please boost this message to spread the word!

Virilization Fans or VFans for short is a brand-new instance for transmasculine people and allies.
Registrations are open, so please feel free to apply for an account here.

What can you expect from us?

  • VFans does its best to moderate the server from any unwanted content, especially from bigotry towards transmasc people and POC, as those are demographics often neglected by wider Fediverse.
  • The instance is co-owned by an Indigenous person and is hosted outside of US and UK jurisdictions (therefore we will not be affected by their legislation)
  • As the server uses Akkoma software, you are free to customize the theme of the default front-end (including fonts) to accomodate your disabilities when using our instance.
  • We do balance our moderation actions and try not to apply complete defederations unless severe rule violations occur and the remote admins repeatedly refuse to moderate their user(s), and instead opt for limiting the instance or suspending individual users
  • We blocked Threads on our instance!

Anything else
If you need help, have questions or feedback, feel free to DM this account. Please do not reach out to individual staff accounts about moderation issues. That allows all of VFans staff to chime in to the conversation and/or pass through if necessary.

#transmasc#queer#LGBT#transmasculine#POC#nonbinary#newHere#introduction

Please boost this message to spread the word!

Virilization Fans or VFans for short is a brand-new instance for transmasculine people and allies.
Registrations are open, so please feel free to apply for an account here.

What can you expect from us?

  • VFans does its best to moderate the server from any unwanted content, especially from bigotry towards transmasc people and POC, as those are demographics often neglected by wider Fediverse.
  • The instance is co-owned by an Indigenous person and is hosted outside of US and UK jurisdictions (therefore we will not be affected by their legislation)
  • As the server uses Akkoma software, you are free to customize the theme of the default front-end (including fonts) to accomodate your disabilities when using our instance.
  • We do balance our moderation actions and try not to apply complete defederations unless severe rule violations occur and the remote admins repeatedly refuse to moderate their user(s), and instead opt for limiting the instance or suspending individual users
  • We blocked Threads on our instance!

Anything else
If you need help, have questions or feedback, feel free to DM this account. Please do not reach out to individual staff accounts about moderation issues. That allows all of VFans staff to chime in to the conversation and/or pass through if necessary.

#transmasc#queer#LGBT#transmasculine#POC#nonbinary#newHere#introduction