Skip to content

gladykov/typeorm-next.js

Repository files navigation

TypeORM + Next.js example

TypeORM 0.3 + Next 15

People say it is hard, and it is, but it is possible.

Steps:

  1. npm install
  2. docker compose up
  3. npm run migration:run
  4. npm run dev
  5. It will build if you do npm run build

Example details:

  • both client rendering and serverside rendering examples on same page
  • relations between tables work
  • in dataSource.ts you need to manually specify every Entity and Migration - this is sad, but all other attempts failed
  • for simplicity no auth in example
  • if you will need auth, you will not be able to use middleware for that - middleware is retarted comparing to other parts of next.js
  • Bonus: Some Mantine + Tailwind CSS

You can do better than that? Great! Please create PR, let's make it easier for people.

About

TypeORM with Next.JS example project

Resources

License

Stars

8 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors