### Navigate, Install, and Start Redwood Project Source: https://github.com/emelleby/docwood/blob/main/docs/content/03_reference/docs/quick-start.md Commands to navigate into the created project directory, install dependencies, and start the development server. This is the typical workflow after project creation. ```bash cd my-redwood-project yarn install yarn redwood dev ``` -------------------------------- ### Navigate, Install, and Start Redwood Project Source: https://github.com/emelleby/docwood/blob/main/docs/content/01_quick-start.md Commands to navigate into the created project directory, install dependencies, and start the development server. This is the typical workflow after project creation. ```bash cd my-redwood-project yarn install yarn redwood dev ``` -------------------------------- ### Redwood UI Setup Help Source: https://github.com/emelleby/docwood/blob/main/docs/content/01_quick-start.md Command to display help for setting up UI libraries in a Redwood project. ```bash yarn rw setup ui --help ``` -------------------------------- ### Redwood UI Setup Help Source: https://github.com/emelleby/docwood/blob/main/docs/content/03_reference/docs/quick-start.md Command to display help for setting up UI libraries in a Redwood project. ```bash yarn rw setup ui --help ``` -------------------------------- ### Install Dependencies and Start Development Server Source: https://github.com/emelleby/docwood/blob/main/docs/content/03_reference/docs/tutorial/chapter1/installation.md Installs project dependencies and starts the Redwood development server. ```bash cd redwoodblog yarn install yarn redwood dev ``` -------------------------------- ### Install Dependencies and Start Development Server Source: https://github.com/emelleby/docwood/blob/main/docs/content/02_tutorial/03_chapter1/installation.md Installs project dependencies and starts the Redwood development server. ```bash cd redwoodblog yarn install yarn redwood dev ``` -------------------------------- ### RedwoodJS Deployment Setup Help Source: https://github.com/emelleby/docwood/blob/main/docs/content/01_quick-start.md Displays help information for setting up deployment configurations for RedwoodJS projects. This command is useful for understanding the available options and parameters for deploying your application to various targets. ```bash yarn rw setup deploy --help ``` -------------------------------- ### Clone Example Repository and Setup Source: https://github.com/emelleby/docwood/blob/main/docs/content/03_reference/docs/tutorial/intermission.md Clones the RedwoodJS tutorial example repository, installs dependencies, sets up the database, and generates a secret key for session management. ```bash git clone https://github.com/redwoodjs/redwood-tutorial cd redwood-tutorial yarn install yarn rw prisma migrate dev yarn rw g secret ``` -------------------------------- ### RedwoodJS Deployment Setup Help Source: https://github.com/emelleby/docwood/blob/main/docs/content/03_reference/docs/quick-start.md Displays help information for setting up deployment configurations for RedwoodJS projects. This command is useful for understanding the available options and parameters for deploying your application to various targets. ```bash yarn rw setup deploy --help ``` -------------------------------- ### Setup Example Package Source: https://github.com/emelleby/docwood/blob/main/docs/content/03_reference/docs/cli-commands.md Installs and sets up a specified RedwoodJS example package. Supports specifying npm tags and forcing installation without compatibility checks. ```bash ~/redwood-app$ yarn rw setup package @redwoodjs/setup-example ``` ```bash ~/redwood-app$ yarn rw setup package @redwoodjs/setup-example@beta --force ``` -------------------------------- ### RedwoodJS Authentication Setup Help Source: https://github.com/emelleby/docwood/blob/main/docs/content/01_quick-start.md Displays help information for setting up authentication for RedwoodJS projects. This command helps in understanding how to integrate Redwood's built-in database-backed authentication or third-party authentication providers. ```bash yarn rw setup auth --help ``` -------------------------------- ### Clone Example Repository and Setup Source: https://github.com/emelleby/docwood/blob/main/docs/content/02_tutorial/06_intermission.md Clones the RedwoodJS tutorial example repository, installs dependencies, sets up the database, and generates a secret key for session management. ```bash git clone https://github.com/redwoodjs/redwood-tutorial cd redwood-tutorial yarn install yarn rw prisma migrate dev yarn rw g secret ``` -------------------------------- ### RedwoodJS Authentication Setup Help Source: https://github.com/emelleby/docwood/blob/main/docs/content/03_reference/docs/quick-start.md Displays help information for setting up authentication for RedwoodJS projects. This command helps in understanding how to integrate Redwood's built-in database-backed authentication or third-party authentication providers. ```bash yarn rw setup auth --help ``` -------------------------------- ### Setup Mailer Source: https://github.com/emelleby/docwood/blob/main/docs/content/03_reference/docs/cli-commands.md Installs packages and files for using the RedwoodJS mailer. By default, it creates an example mail template. Use `--skip-examples` to omit example content or `--force` to overwrite existing files. ```bash yarn redwood setup mailer ``` -------------------------------- ### Start Storybook Server Source: https://github.com/emelleby/docwood/blob/main/docs/content/01_quick-start.md Command to start the Storybook server for developing and testing UI components in isolation. ```bash yarn rw storybook ``` -------------------------------- ### Start Storybook Server Source: https://github.com/emelleby/docwood/blob/main/docs/content/03_reference/docs/quick-start.md Command to start the Storybook server for developing and testing UI components in isolation. ```bash yarn rw storybook ``` -------------------------------- ### Redwood Build Command Examples Source: https://github.com/emelleby/docwood/blob/main/docs/content/03_reference/docs/deploy/introduction.md Examples of the Redwood CLI build command for different deployment targets. ```shell # Build command for Netlify deploy target yarn rw deploy netlify ``` ```shell # Build command for Vercel deploy target yarn rw deploy vercel ``` ```shell # Build command for AWS Lambdas using the https://serverless.com framework yarn rw deploy serverless --side api ``` ```shell # Build command for Edgio deploy target yarn rw deploy edgio ``` ```shell # Build command for baremetal deploy target yarn rw deploy baremetal [--first-run] ``` -------------------------------- ### Setup Realtime Source: https://github.com/emelleby/docwood/blob/main/docs/content/03_reference/docs/cli-commands.md Configures RedwoodJS for realtime features using GraphQL live queries and subscriptions. This command installs necessary packages, sets up the API, and can include example implementations. ```bash yarn redwood setup realtime ``` ```bash ~/redwood-app$ yarn rw setup realtime ✔ Checking for realtime environment prerequisites ... ✔ Adding required api packages... ✔ Adding the realtime api lib ... ✔ Adding Countdown example subscription ... ✔ Adding NewMessage example subscription ... ✔ Adding Auctions example live query ... ✔ Generating types ... ✔ Adding the experimental server file... ✔ Adding config to redwood.toml... ✔ Adding required api packages... ``` -------------------------------- ### Create a New Redwood Project with TypeScript Source: https://github.com/emelleby/docwood/blob/main/docs/content/03_reference/docs/quick-start.md Command to create a new Redwood project with TypeScript support enabled from the start. This is recommended for projects that will use TypeScript. ```bash yarn create redwood-app my-redwood-project --typescript ``` -------------------------------- ### Create a New Redwood Project with TypeScript Source: https://github.com/emelleby/docwood/blob/main/docs/content/01_quick-start.md Command to create a new Redwood project with TypeScript support enabled from the start. This is recommended for projects that will use TypeScript. ```bash yarn create redwood-app my-redwood-project --typescript ``` -------------------------------- ### Redwood CLI Help Source: https://github.com/emelleby/docwood/blob/main/docs/content/01_quick-start.md Command to display help information for the Redwood CLI, listing available commands and their usage. ```bash yarn redwood --help ``` -------------------------------- ### Create a New Redwood Project Source: https://github.com/emelleby/docwood/blob/main/docs/content/01_quick-start.md Command to create a new Redwood project. This initializes a new Redwood application with default settings. ```bash yarn create redwood-app my-redwood-project ``` -------------------------------- ### Initial Git Commit Source: https://github.com/emelleby/docwood/blob/main/docs/content/03_reference/docs/tutorial/chapter1/installation.md Initializes a Git repository, stages all files, and creates the first commit for the project. ```git git init git add . git commit -m 'First commit' ``` -------------------------------- ### Redwood CLI Help Source: https://github.com/emelleby/docwood/blob/main/docs/content/03_reference/docs/quick-start.md Command to display help information for the Redwood CLI, listing available commands and their usage. ```bash yarn redwood --help ``` -------------------------------- ### Start RedwoodJS Studio Source: https://github.com/emelleby/docwood/blob/main/docs/content/03_reference/docs/studio.md Command to start the RedwoodJS Studio development tool. This command will install the studio package if it's the first time it's being run. ```bash yarn rw studio ``` -------------------------------- ### Setup Firebase Authentication Source: https://github.com/emelleby/docwood/blob/main/docs/content/03_reference/docs/auth/firebase.md Command to install necessary packages and configure Firebase authentication. ```bash yarn rw setup auth firebase ``` -------------------------------- ### Redwood Dev API Server Example Source: https://github.com/emelleby/docwood/blob/main/docs/content/03_reference/docs/cli-commands.md Illustrates starting only the Redwood API development server to access the GraphQL Playground. ```bash ~/redwood-app$ yarn redwood dev api yarn run v1.22.4 $ /redwood-app/node_modules/.bin/redwood dev api $ /redwood-app/node_modules/.bin/dev-server 15:04:51 api | Listening on http://localhost:8911 15:04:51 api | Watching /home/dominic/projects/redwood/redwood-app/api 15:04:51 api \ | 15:04:51 api | Now serving 15:04:51 api \ | 15:04:51 api | ► http://localhost:8911/graphql/ ``` -------------------------------- ### Initial Git Commit Source: https://github.com/emelleby/docwood/blob/main/docs/content/02_tutorial/03_chapter1/installation.md Initializes a Git repository, stages all files, and creates the first commit for the project. ```git git init git add . git commit -m 'First commit' ``` -------------------------------- ### Create a New Redwood Project Source: https://github.com/emelleby/docwood/blob/main/docs/content/03_reference/docs/quick-start.md Command to create a new Redwood project. This initializes a new Redwood application with default settings. ```bash yarn create redwood-app my-redwood-project ``` -------------------------------- ### Prisma Studio Command Source: https://github.com/emelleby/docwood/blob/main/docs/content/04_how-to/oauth.md Command to start Prisma Studio, a GUI tool for managing your database, which is included with RedwoodJS. ```bash yarn rw prisma studio ``` -------------------------------- ### RedwoodJS Netlify Setup Command Source: https://github.com/emelleby/docwood/blob/main/docs/content/03_reference/docs/tutorial/chapter4/deployment.md This command initiates the Netlify deployment setup for a RedwoodJS project. It adds a `netlify.toml` configuration file to your project's root directory, which can be customized for your application's needs. Ensure you commit and push these changes to your repository. ```bash yarn rw setup deploy netlify ``` -------------------------------- ### Setup Netlify Auth Source: https://github.com/emelleby/docwood/blob/main/docs/content/03_reference/docs/auth/netlify.md Installs necessary packages, writes files, and modifies code for Netlify Identity authentication. ```bash yarn rw setup auth netlify ``` -------------------------------- ### Basic Auth0 Integration on Home Page Source: https://github.com/emelleby/docwood/blob/main/docs/content/03_reference/docs/auth/auth0.md Demonstrates how to use the `useAuth` hook to get authentication status and initiate the sign-up process. ```tsx import { useAuth } from 'src/auth' const HomePage = () => { const { isAuthenticated, signUp } = useAuth() return ( <> {/* MetaTags, h1, paragraphs, etc. */}

{JSON.stringify({ isAuthenticated })}

) } ``` -------------------------------- ### Create Redwood App (JavaScript) Source: https://github.com/emelleby/docwood/blob/main/docs/content/03_reference/docs/tutorial/chapter1/installation.md Creates a new Redwood app project using JavaScript with the Yarn package manager. ```bash yarn create redwood-app ./redwoodblog ``` -------------------------------- ### RedwoodJS Netlify Setup Command Source: https://github.com/emelleby/docwood/blob/main/docs/content/02_tutorial/07_chapter4/deployment.md This command initiates the Netlify deployment setup for a RedwoodJS project. It adds a `netlify.toml` configuration file to your project's root directory, which can be customized for your application's needs. Ensure you commit and push these changes to your repository. ```bash yarn rw setup deploy netlify ``` -------------------------------- ### Create a new RedwoodJS app Source: https://github.com/emelleby/docwood/blob/main/docs/content/04_how-to/windows-development-setup.md Command to create a new RedwoodJS project named 'myApp'. This is the starting point after the development environment is set up. ```bash yarn create redwood-app myApp ``` -------------------------------- ### Create Redwood App (TypeScript) Source: https://github.com/emelleby/docwood/blob/main/docs/content/03_reference/docs/tutorial/chapter1/installation.md Creates a new Redwood app project using TypeScript with the Yarn package manager. ```bash yarn create redwood-app --ts ./redwoodblog ``` -------------------------------- ### Prisma Database Migration Source: https://github.com/emelleby/docwood/blob/main/docs/content/01_quick-start.md Command to run Prisma database migrations in a development environment. It prompts for a migration name. ```bash yarn rw prisma migrate dev # ... ? Enter a name for the new migration: › create posts ``` -------------------------------- ### Prisma Database Migration Source: https://github.com/emelleby/docwood/blob/main/docs/content/03_reference/docs/quick-start.md Command to run Prisma database migrations in a development environment. It prompts for a migration name. ```bash yarn rw prisma migrate dev # ... ? Enter a name for the new migration: › create posts ``` -------------------------------- ### Create Redwood App (JavaScript) Source: https://github.com/emelleby/docwood/blob/main/docs/content/02_tutorial/03_chapter1/installation.md Creates a new Redwood app project using JavaScript with the Yarn package manager. ```bash yarn create redwood-app ./redwoodblog ``` -------------------------------- ### Setup Supabase Authentication Source: https://github.com/emelleby/docwood/blob/main/docs/content/03_reference/docs/auth/supabase.md Command to set up Supabase authentication, installing necessary packages and modifying project files. ```bash yarn rw setup auth supabase ``` -------------------------------- ### Create Redwood App (TypeScript) Source: https://github.com/emelleby/docwood/blob/main/docs/content/02_tutorial/03_chapter1/installation.md Creates a new Redwood app project using TypeScript with the Yarn package manager. ```bash yarn create redwood-app --ts ./redwoodblog ``` -------------------------------- ### Generate Redwood Cell Source: https://github.com/emelleby/docwood/blob/main/docs/content/03_reference/docs/quick-start.md Command to generate a Redwood Cell, which is Redwood's data-fetching abstraction, useful for Storybook examples. ```bash yarn rw generate cell examplePosts ``` -------------------------------- ### Start Storybook Server Source: https://github.com/emelleby/docwood/blob/main/docs/content/03_reference/docs/tutorial/chapter5/storybook.md Command to start the Storybook server. This command compiles the project and makes Storybook available at a specified local URL. ```bash yarn rw storybook ``` -------------------------------- ### Generate Redwood Cell Source: https://github.com/emelleby/docwood/blob/main/docs/content/01_quick-start.md Command to generate a Redwood Cell, which is Redwood's data-fetching abstraction, useful for Storybook examples. ```bash yarn rw generate cell examplePosts ``` -------------------------------- ### Start Storybook Server Source: https://github.com/emelleby/docwood/blob/main/docs/content/02_tutorial/08_chapter5/storybook.md Command to start the Storybook server. This command compiles the project and makes Storybook available at a specified local URL. ```bash yarn rw storybook ``` -------------------------------- ### Web Serve Stage Source: https://github.com/emelleby/docwood/blob/main/docs/content/03_reference/docs/docker.md This Dockerfile stage is responsible for serving the built web application. It sets up the Node.js environment, installs dependencies, copies the built web assets, and starts the web server using `rw-web-server`. ```Dockerfile FROM node:20-bookworm-slim as web_serve RUN corepack enable USER node WORKDIR /home/node/app COPY --chown=node:node .yarnrc.yml . COPY --chown=node:node package.json . COPY --chown=node:node web/package.json web/ COPY --chown=node:node yarn.lock . RUN mkdir -p /home/node/.yarn/berry/index RUN mkdir -p /home/node/.cache RUN --mount=type=cache,target=/home/node/.yarn/berry/cache,uid=1000 \ --mount=type=cache,target=/home/node/.cache,uid=1000 \ CI=1 yarn workspaces focus web --production COPY --chown=node:node redwood.toml . COPY --chown=node:node graphql.config.js . COPY --chown=node:node .env.defaults .env.defaults COPY --chown=node:node --from=web_build /home/node/app/web/dist /home/node/app/web/dist ENV NODE_ENV=production \ API_PROXY_TARGET=http://api:8911 CMD "node_modules/.bin/rw-web-server" "--api-proxy-target" "$API_PROXY_TARGET" ``` -------------------------------- ### Start PostgreSQL Service Source: https://github.com/emelleby/docwood/blob/main/docs/content/03_reference/docs/local-postgres-setup.md Starts the PostgreSQL service if it is not already running on macOS using Homebrew services. ```bash brew services start postgresql ``` -------------------------------- ### Install PostgreSQL on macOS Source: https://github.com/emelleby/docwood/blob/main/docs/content/03_reference/docs/local-postgres-setup.md Installs PostgreSQL version 14 using Homebrew on macOS. This is a prerequisite for using Postgres with RedwoodJS. ```bash brew install postgresql@14 ``` -------------------------------- ### Install Node.js LTS and Yarn Source: https://github.com/emelleby/docwood/blob/main/docs/content/04_how-to/windows-development-setup.md Installs the latest Long Term Support (LTS) version of Node.js with the latest npm, and then installs Yarn globally. This is a crucial step for setting up the RedwoodJS development environment. ```bash $ nvm install lts --latest-npm // installs latest LTS and npm e.g. 16.13.1 for the following examples $ nvm use 16.13.1 npm install -g yarn ``` -------------------------------- ### Netlify Quick Start Deploy Source: https://github.com/emelleby/docwood/blob/main/docs/content/03_reference/docs/deploy/netlify.md Steps to quickly deploy a RedwoodJS project to Netlify without custom code or a database. This involves creating a new Redwood project, initializing Git, setting up Netlify deployment, and then using Netlify's Quick Start for deployment. ```bash yarn create redwood-app ./netlify-deploy git init git commit -am "Initial commit" yarn rw setup deploy netlify git commit -am "Setup Netlify deploy" git push origin main ``` -------------------------------- ### Set up PM2 Directories Source: https://github.com/emelleby/docwood/blob/main/docs/content/04_how-to/self-hosting-redwood.md Installs project dependencies and sets up the necessary directories on the server for PM2 deployment. ```bash yarn install yarn deploy:setup ``` -------------------------------- ### RedwoodJS Docker Setup Command Source: https://github.com/emelleby/docwood/blob/main/docs/content/03_reference/docs/docker.md This command initiates the Docker setup for a RedwoodJS project. It generates essential Docker configuration files, installs necessary packages for API and web servers, and adjusts the redwood.toml configuration. ```bash yarn rw setup docker ``` -------------------------------- ### Setup Sentry Monitoring Source: https://github.com/emelleby/docwood/blob/main/docs/content/03_reference/docs/monitoring/sentry.md Command to install and set up Sentry monitoring for a RedwoodJS application. This includes installing `@sentry/node` and `@sentry/react` and enabling Prisma and Browser tracing. ```bash yarn redwood setup monitoring sentry ``` -------------------------------- ### Start Development Server Source: https://github.com/emelleby/docwood/blob/main/docs/content/03_reference/docs/tutorial/intermission.md Starts the RedwoodJS development server to view your application locally. ```bash yarn rw dev ``` -------------------------------- ### Start Development Server Source: https://github.com/emelleby/docwood/blob/main/docs/content/02_tutorial/06_intermission.md Starts the RedwoodJS development server to view your application locally. ```bash yarn rw dev ``` -------------------------------- ### Dockerfile api_serve Stage - Dependency Installation Source: https://github.com/emelleby/docwood/blob/main/docs/content/03_reference/docs/docker.md Installs production dependencies for the API using Yarn workspaces focus. This stage leverages Docker's cache mounts for faster builds and optimizes image size by only installing necessary packages. ```Dockerfile USER node WORKDIR /home/node/app COPY --chown=node:node .yarnrc.yml .yarnrc.yml COPY --chown=node:node package.json . COPY --chown=node:node api/package.json api/ COPY --chown=node:node yarn.lock yarn.lock RUN mkdir -p /home/node/.yarn/berry/index RUN mkdir -p /home/node/.cache RUN --mount=type=cache,target=/home/node/.yarn/berry/cache,uid=1000 \ --mount=type=cache,target=/home/node/.cache,uid=1000 \ CI=1 yarn workspaces focus api --production ``` -------------------------------- ### Install OpenSSL and Dependencies Source: https://github.com/emelleby/docwood/blob/main/docs/content/03_reference/docs/docker.md Installs OpenSSL, which is required by Prisma on Linux, and other build tools like make and gcc. It combines apt-get update and install in a single RUN command for cache busting and cleans up apt lists to reduce image size. ```Dockerfile RUN apt-get update && apt-get install -y \ openssl \ # python3 make gcc \ && rm -rf /var/lib/apt/lists/* ``` -------------------------------- ### Dockerfile api_serve Stage - Base Setup Source: https://github.com/emelleby/docwood/blob/main/docs/content/03_reference/docs/docker.md Initializes the production Docker image for serving the API. It uses a slim Node.js image and installs necessary system packages like openssl. ```Dockerfile FROM node:20-bookworm-slim as api_serve RUN corepack enable RUN apt-get update && apt-get install -y \ openssl \ # python3 make gcc \ && rm -rf /var/lib/apt/lists/* ``` -------------------------------- ### Setup Tailwind CSS Source: https://github.com/emelleby/docwood/blob/main/docs/content/03_reference/docs/tutorial/intermission.md Installs and sets up Tailwind CSS in your RedwoodJS project to enable styling. ```bash yarn rw setup ui tailwindcss ``` -------------------------------- ### Setup Tailwind CSS Source: https://github.com/emelleby/docwood/blob/main/docs/content/02_tutorial/06_intermission.md Installs and sets up Tailwind CSS in your RedwoodJS project to enable styling. ```bash yarn rw setup ui tailwindcss ``` -------------------------------- ### Setup GoTrue Auth with RedwoodJS CLI Source: https://github.com/emelleby/docwood/blob/main/docs/content/04_how-to/gotrue-auth.md This command installs the necessary packages and generates boilerplate code and files for Redwood Auth using the GoTrue provider. It simplifies the initial setup process for Netlify Identity integration. ```bash yarn redwood setup auth goTrue ``` -------------------------------- ### Baremetal Deployment Setup Source: https://github.com/emelleby/docwood/blob/main/docs/content/03_reference/docs/deploy/baremetal.md Command to set up the necessary configuration files for baremetal deployment in a RedwoodJS project. ```bash yarn rw setup deploy baremetal ``` -------------------------------- ### GraphQL Tracing Log Output Example Source: https://github.com/emelleby/docwood/blob/main/docs/content/03_reference/docs/graphql.md An example of the log output generated when GraphQL tracing is enabled in RedwoodJS. It shows the structure of tracing data, including start time, end time, duration, and resolver execution details. ```bash pi | INFO [2021-07-09 14:25:52.452 +0000] (graphql-server): GraphQL willSendResponse api | tracing: { api | "version": 1, api | "startTime": "2021-07-09T14:25:51.931Z", api | "endTime": "2021-07-09T14:25:52.452Z", api | "duration": 521131526, api | "execution": { api | "resolvers": [ api | { api | "path": [ api | "post" api | ], api | "parentType": "Query", api | "fieldName": "post", api | "returnType": "Post!", api | "startOffset": 1787428, api | "duration": 519121497 api | }, api | { api | "path": [ api | "post", api | "id" api | ], api | "parentType": "Post", api | "fieldName": "id", api | "returnType": "Int!", api | "startOffset": 520982888, api | "duration": 25140 api | }, api | ... more paths follow ... api | ] api | } api | } ``` -------------------------------- ### GraphQL Schema for Posts Source: https://github.com/emelleby/docwood/blob/main/docs/content/03_reference/docs/tutorial/chapter2/getting-dynamic.md Example of the GraphQL schema definition for post-related queries and mutations. ```jsx type Post { id: Int! title: String! body: String! createdAt: DateTime! } type Query { posts: [Post!] post(id: Int!): Post } input CreatePostInput { title: String! body: String! } input UpdatePostInput { title: String body: String } type Mutation { createPost(input: CreatePostInput!): Post! updatePost(id: Int!, input: UpdatePostInput!): Post! deletePost(id: Int!): Post! } ``` -------------------------------- ### Gitpod Workspace Initialization Steps Source: https://github.com/emelleby/docwood/blob/main/docs/content/03_reference/docs/contributing-walkthrough.md This outlines the automated steps Gitpod performs when initializing a workspace for a RedwoodJS project. These steps include checking out code, installing dependencies, building the test project, syncing code, and starting the dev server. ```bash # 1. Checks-out the code from your branch or PR # 2. Run Yarn installation # 3. Creates the functional Test Project via `yarn build:test-project` # 4. Syncs the Framework code with the Test Project # 5. Starts the Test Project dev server ``` -------------------------------- ### Server Directory and Permissions Setup Source: https://github.com/emelleby/docwood/blob/main/docs/content/03_reference/docs/deploy/baremetal.md Commands to create a deployment directory and set appropriate ownership for a RedwoodJS application. ```bash sudo mkdir -p /var/www/myapp sudo chown deploy:deploy /var/www/myapp ``` -------------------------------- ### GraphQL Schema for Posts Source: https://github.com/emelleby/docwood/blob/main/docs/content/02_tutorial/04_chapter2/getting-dynamic.md Example of the GraphQL schema definition for post-related queries and mutations. ```jsx type Post { id: Int! title: String! body: String! createdAt: DateTime! } type Query { posts: [Post!] post(id: Int!): Post } input CreatePostInput { title: String! body: String! } input UpdatePostInput { title: String body: String } type Mutation { createPost(input: CreatePostInput!): Post! updatePost(id: Int!, input: UpdatePostInput!): Post! deletePost(id: Int!): Post! } ``` -------------------------------- ### Netlify Deployment and Preview Source: https://github.com/emelleby/docwood/blob/main/docs/content/02_tutorial/07_chapter4/deployment.md Instructions on how to trigger a site deploy on Netlify and preview the deployed site. It explains the difference between preview URLs and the main site URL, and how commit hashes affect the preview. ```markdown Now go over to the **Deploys** tab in the top nav and open the **Trigger deploy** dropdown on the right, then finally choose **Deploy site**: ![Trigger deploy](https://user-images.githubusercontent.com/300/83187760-835aae80-a0e3-11ea-9733-ff54969bba1f.png) With a little luck (and SCIENCE) it will complete successfully! You can click the **Preview** button at the top of the deploy log page, or go back and click the URL of your Netlify site towards the top: ![Netlify URL](https://user-images.githubusercontent.com/300/83187909-bef57880-a0e3-11ea-97dc-e557248acd3a.png) :::info If you view a deploy via the **Preview** button notice that the URL contains a hash of the latest commit. Netlify will create one of these for every push to `main` but it will only ever show this exact commit, so if you deploy again and refresh you won't see any changes. The real URL for your site (the one you get from your site's homepage in Netlify) will always show the latest successful deploy. See [Branch Deploys](#branch-deploys) below for more info. ::: Did it work? If you see "Empty" under the About and Contact links then it did! Yay! You're seeing "Empty" because you don't have any posts in your brand new production database so head to `/admin/posts` and create a couple, then go back to the homepage to see them. If the deploy failed, check the log output in Netlify and see if you can make sense of the error. If the deploy was successful but the site doesn't come up, try opening the web inspector and look for errors. Are you sure you pasted the entire Postgres connection string correctly? If you're really, really stuck head over to the [Redwood Community](https://community.redwoodjs.com) and ask for help. ``` -------------------------------- ### Netlify Deployment and Preview Source: https://github.com/emelleby/docwood/blob/main/docs/content/03_reference/docs/tutorial/chapter4/deployment.md Instructions on how to trigger a site deploy on Netlify and preview the deployed site. It explains the difference between preview URLs and the main site URL, and how commit hashes affect the preview. ```markdown Now go over to the **Deploys** tab in the top nav and open the **Trigger deploy** dropdown on the right, then finally choose **Deploy site**: ![Trigger deploy](https://user-images.githubusercontent.com/300/83187760-835aae80-a0e3-11ea-9733-ff54969bba1f.png) With a little luck (and SCIENCE) it will complete successfully! You can click the **Preview** button at the top of the deploy log page, or go back and click the URL of your Netlify site towards the top: ![Netlify URL](https://user-images.githubusercontent.com/300/83187909-bef57880-a0e3-11ea-97dc-e557248acd3a.png) :::info If you view a deploy via the **Preview** button notice that the URL contains a hash of the latest commit. Netlify will create one of these for every push to `main` but it will only ever show this exact commit, so if you deploy again and refresh you won't see any changes. The real URL for your site (the one you get from your site's homepage in Netlify) will always show the latest successful deploy. See [Branch Deploys](#branch-deploys) below for more info. ::: Did it work? If you see "Empty" under the About and Contact links then it did! Yay! You're seeing "Empty" because you don't have any posts in your brand new production database so head to `/admin/posts` and create a couple, then go back to the homepage to see them. If the deploy failed, check the log output in Netlify and see if you can make sense of the error. If the deploy was successful but the site doesn't come up, try opening the web inspector and look for errors. Are you sure you pasted the entire Postgres connection string correctly? If you're really, really stuck head over to the [Redwood Community](https://community.redwoodjs.com) and ask for help. ``` -------------------------------- ### Prisma Schema for PostgreSQL Source: https://github.com/emelleby/docwood/blob/main/docs/content/03_reference/docs/deploy/introduction.md Example of how to configure the Prisma schema to use PostgreSQL as the database provider in a production environment. ```jsx datasource db { provider = "postgresql" url = env("DATABASE_URL") } ``` -------------------------------- ### GraphQL Live Query Example Source: https://github.com/emelleby/docwood/blob/main/docs/content/03_reference/docs/realtime.md Demonstrates how to use the @live directive in GraphQL to listen for data changes. Includes a query to get current auction bids and a mutation to make a bid. The example illustrates automatic refetching of data when changes occur. ```graphql query GetCurrentAuctionBids @live { auction(id: "1") { bids { amount } highestBid { amount } id title } } mutation MakeBid { bid(input: { auctionId: "1", amount: 10 }) { amount } } ``` -------------------------------- ### Prisma Schema Database Configuration Source: https://github.com/emelleby/docwood/blob/main/docs/content/03_reference/docs/tutorial/chapter5/testing.md Example of a Prisma schema configuration showing the provider and URL for a PostgreSQL database. The error message indicates an issue with this configuration. ```prisma datasource db { provider = "postgresql" url = env("DATABASE_URL") } ``` -------------------------------- ### Edgio Deploy Setup and Execution Source: https://github.com/emelleby/docwood/blob/main/docs/content/03_reference/docs/deploy/edgio.md This snippet covers the commands required to set up and deploy a RedwoodJS project to Edgio. It includes the initial setup command and the deployment command, with an option for using a deploy token in non-interactive environments. ```bash yarn rw setup deploy edgio ``` ```bash yarn rw deploy edgio ``` ```bash yarn rw deploy edgio --token=XXX ```