Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added documentation for the Create Redwood App #8777

Merged
merged 6 commits into from
Jul 6, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 94 additions & 0 deletions docs/docs/create-redwood-app.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
---
slug: create-redwood-app
description:
---

# Create Redwood App

## Set up for success
Redwood requires that you're running Node version 18.0.0 or higher.

If you're running Node version 19.0.0 or above, you can still use Create Redwood app, but it may make your project incompatible with some deploy targets, such as AWS Lambdas.

To see what version of Node you're running, you can run the following command in your terminal:

```terminal
node -v
```

If you need to update your version of Node or run multiple versions of Node, we recommend installing nvm and have [documentation about how to get up and running.](/docs/how-to/using-nvm)

You also need to have yarn version 1.15 or higher installed. To see what version of yarn you're running, you can run the following command in your terminal:

```terminal
yarn -v
```

To upgrade your version of yarn, [you can refer to the yarn documentation](https://yarnpkg.com/getting-started/install).

## What you can expect

### Select your preferred language
Options: TypeScript or JavaScript

If you choose JavaScript, you can always [add TypeScript later](/docs/typescript/introduction#converting-a-javascript-project-to-typescript).

### Do you want to initialize a git repo?
Options: yes (default) or no

If you mark "yes", then it will ask you to **Enter a commit message**. The default is message is "Initial commit."

You can always initialize a git repo later and add a commit message by running the following commands in your terminal:

```terminal
git init
git add .
git commit -m "Initial commit"
```

If you're new to git, Amy Dutton has a great playlist on YouTube: [git for Beginners](https://www.youtube.com/playlist?list=PLrz61zkUHJJFmfTgOVL1mBw_NZcgGe882)

### Do you want to run `yarn install`?
Options: yes (default) or no

This command will download all of your project's dependencies.

If you mark "no", you can always run this command later:

```terminal
cd <your-app-name>
yarn install
```

## Running the development server

Once the Create Redwood app has finished running, you can start your development server by running the following command:

```terminal
cd <your-app-name>
yarn install
yarn rw dev
```

- This will start your development server at `http://localhost:8910`.
- Your API will be available at `http://localhost:8911`.
- You can visit the Redwood GraphQL Playground at `http://localhost:8911/graphql`.

## Flags
You can by pass these prompts by using the following flags:

| Flag | What it does |
| --- | --- |
| `--yarn-install` | Run `yarn install` |
| `--typescript` | Set TypeScript as the preferred language (default to JavaScript) |
| `--overwrite` | What it does |
| `--git-init` | Initializes a git repository |
| `--commit-message "Initial commit"` | Specifies the initial git commit message |

For example, here's the project with all flags enabled:

```terminal
yarn create redwood-app <your-app-name> --typescript --git-init --commit-message "Initial commit" --yarn-install
```