Code Monkey home page Code Monkey logo

nextjs-prisma-graphql-nexus-poc's Introduction

Getting started

1. Download example and install dependencies

Clone this repository:

git clone [email protected]:boostvolt/nextjs-prisma-graphql-nexus-poc.git

Install npm dependencies:

cd nextjs-prisma-graphql-nexus
npm install

2. Create and seed the database

Run the following command to create your SQLite database file. This also creates the User and Post tables that are defined in prisma/schema.prisma:

Development

npm run prisma:dev

Production

npm run prisma:deploy

When the command is executed against a newly created database, seeding is also triggered. The seed file in prisma/seed.ts will be executed and your database will be populated with the sample data.

3. Generate GraphQL schema and collection

Run the following command to automatically generate a GraphQL schema and collection based on the specified mutations, queries and types.

npm run generate

4. Start the app

npm run dev

The app is now running, navigate to http://localhost:3000/ in your browser to explore its UI.

References

Next.js

Next.js Documentation - learn about Next.js features and API.

Learn Next.js - an interactive Next.js tutorial.

Prisma

Prisma Documentation - learn about Prisma features.

Prisma Getting started - getting started with Prisma.

GraphQL

GraphQL - the specification for GraphQL

GraphQL Code Generator - read more about the generation of the schemas

Nexus - the code first GraphQL schema construction used in this project

Nexus Prisma - the official Prisma plugin for Nexus

Apollo - the GraphQL client used in this project

nextjs-prisma-graphql-nexus-poc's People

Contributors

boostvolt avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.