Skip to content

Instantly share code, notes, and snippets.

@goldcaddy77
Last active December 12, 2019 17:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save goldcaddy77/7e374aa5bde8e204135f17f0b7f19dfe to your computer and use it in GitHub Desktop.
Save goldcaddy77/7e374aa5bde8e204135f17f0b7f19dfe to your computer and use it in GitHub Desktop.
Warthog Talk Bootstrap
```
# Adds a package.json so that we can install Warthog
yarn init --yes
# Add warthog so that we can use the CLI
yarn add warthog
# Bootstrap a new application using Warthog CLI
yarn warthog new tech-talk
# Install dependencies from generated package.json
yarn
# Generate a resource (model, resolver and service)
yarn warthog generate resource name!
# Generate typescript classes and GraphQL schema
yarn warthog codegen
# Drop DB if it exists
yarn warthog db:drop
# Create your DB
yarn warthog db:create
# Generate the DB migration for your newly generated model
yarn warthog db:migrate:generate --name=create-user-table
# Run the DB migration
yarn warthog db:migrate
# Start the server
yarn start:dev
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment