This is a sample project demonstrating the integration of Nest.js, Next.js, and GraphQL. It provides a boilerplate setup for building server-side rendered applications with a GraphQL API using the Nest.js framework and Next.js for the frontend.
To run this project, you need to have the following software installed on your machine:
- Node.js (version 12 or higher)
- Yarn or npm (Yarn is recommended)
Follow these steps to get the project up and running on your local machine:
-
Clone the repository:
git clone https://github.com/dtsuper3/nest-next-graphql.git
-
Install the dependencies:
cd nest-next-graphql yarn install
or
cd nest-next-graphql npm install
-
Configure the environment variables:
Create a
.env
file in the project root and set the required environment variables. You can use the provided.env.example
file as a reference. -
Start the development server:
yarn dev
or
npm run dev
-
Open your browser and visit http://localhost:3000 to see the application in action.
The project has the following directory structure:
nest-next-graphql/
├── .env.example # Example environment variables file
├── .gitignore # Git ignore file
├── LICENSE # Project license
├── README.md # Project readme (you're reading it now)
├── package.json # Project metadata and dependencies
├── src/ # Source code directory
│ ├── modules/ # Nest.js modules directory
│ ├── pages/ # Next.js pages directory
│ ├── server.ts # Nest.js server entry point
│ └── ...
└── ...
Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request. Make sure to follow the project's code of conduct.
This project is licensed under the MIT License.
Feel free to customize the README according to your specific project requirements and additional sections you may want to include.