'Typeorm config in next js

I spent some days configuring typeorm (postgresql) for Next JS but i didn't succeed. Most tutorials explain how to use prisma with Next JS.

here are the steps I have taken:

  1. I installed pg, reflect-metadata, @types/react, @types/node, typeorm
  2. I generated the typeorm files using npx typeorm init
  3. I edited the ormconfig.js

How to create a typeorm connection and use it in next js ? any good tutorial about using typeorm in next.js ?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source