Last active
December 12, 2019 17:01
-
-
Save goldcaddy77/7e374aa5bde8e204135f17f0b7f19dfe to your computer and use it in GitHub Desktop.
Warthog Talk Bootstrap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
``` | |
# 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