next-add-nest

Seamlessly integrating Next.js with Nest.js


Keywords
next, nest, integration, ts
License
MIT
Install
npm install next-add-nest@1.0.3

Documentation

Next Add Nest

Seamlessly integrating Next.js with Nest.js

Prerequisites

  1. Setup a Next.js Project. If you have no idea how to do it, please go to https://nextjs.org/docs

  2. Integrate Next.js with Typescript. If you have no idea how to do it, please go to https://nextjs.org/docs/basic-features/typescript

Installation

npx next-add-nest

PS: You should manually process the files with names similar to *.bak.1621557880

GraphQL Support

In addition to https://docs.nestjs.com/graphql/quick-start, manually append the following:

// app.module.ts
GraphQLModule.forRoot({
  useGlobalPrefix: true,
}),
// nest-cli.json
"compilerOptions": {
  "plugins": ["@nestjs/graphql/plugin"]
}

To Do

  • Accept args
  • Add testing library

References

https://simonknott.de/articles/Integrating-NextJS-with-NestJS.html