Skip to content

Dwipasca/nodejs-server-graphql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nodejs-server-graphql

Depp or Lib I use

  • nodemon
  • graphql
  • apollo-server
  • prisma
  • @prisma/client

How to use

  • clone this repo
  git clone [email protected]:Dwipasca/nodejs-server-graphql.git
  • go to the project directory
  cd nodejs-server-graphql
  • install depp
  npm i | npm install
  • migrate database sqlite with prisma
  npx prisma migrate dev
  • name your migrate, you can name it as "init" for the first time you clone this project

  • generate prisma client

  npx prisma generate
  • run project
  npm run dev
  • run prisma studio (optional) (show database)
  npx prisma studio

Manipulation file schema.prisma

  • after you add some model in file schema.prisma run this command
  npx prisma migrate dev --name "[name aaction model]"
  // for example
  npx prisma migrate dev --name "add-blog-model"
  • re-generate prisma client
  npx migrate generate

About

Learn how to create server with nodejs and graphql

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published