Tutorials
Setup Prisma
Demo Server
Create New DB
MySQL
Postgres
Connect Empty DB
MySQL
Postgres
Connect DB with Data
MySQL
Postgres
Build GraphQL Servers
Development
Build a GraphQL Server with Prisma
Build a GraphQL Server from Scratch
Build a Realtime GraphQL Server with Subscriptions
Deployment
Deployment with Now
Deployment with Up
Access Prisma from Scripts
Access Prisma from a Node script using Prisma Bindings
Connect to Prisma from the frontend
Bootstrapping Boilerplates
Reference
Service Configuration
Overview
Data Model
Data Modelling (SDL)
Migrations
Introspection
Server-side Subscriptions
Prisma Servers & DBs
Prisma Servers
OverviewDocker
Database Connectors
OverviewMySQLPostgres
Prisma Bindings
OverviewAPI
Code generation
Upgrade Guides
Upgrading Prisma
Overview
Upgrade to 1.7
Upgrade to 1.8

prisma init

Last updated a day ago Edit this page

Creates the local file structure for a new Prisma database API.

If you provide a directory name as an argument to the command, the generated files will be placed inside a new directory with that name.

Note that in Prisma 1.7, the --boilerplate flag has been removed from prisma init. This means you can not bootstrap an entire GraphQL server based on a GraphQL boilerplate project any more.

To bootstrap a GraphQL server based on a GraphQL boilerplate project, use the graphql create command from the GraphQL CLI:

# Install the GraphQL CLI
npm install -g graphql-cli

# Choose a boilerplate from the interactive prompt ...
graphql create myapp 

# ... or directly select a boilerplate project via the `--boilerplate` option (e.g. `typescript-advanced`)
graphql create myapp --boilerplate typescript-advanced

Usage

prisma init DIRNAME

Examples

Create file structure for Prisma database service in directory called myapp.
prisma init myapp

Was this page helpful?