-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added documentation for the Create Redwood App (#8777)
**Notion ID:** [CTL-282](https://www.notion.so/redwoodjs/Add-documentation-for-all-the-prompts-that-are-included-aaaab2be79cf4bb69dbf3962a5bd03a8?pvs=4) ## Feature description Added documentation for the Create Redwood App. This doc includes - All the prompts that the Create Redwood App wil ask you. - Instructions for running some of the commands manually - Information about all the flags available ## Related PRs: #8673 includes a doc for working with nvm. I linked to the doc created within that PR.
- Loading branch information
Showing
2 changed files
with
103 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
--- | ||
slug: create-redwood-app | ||
description: Instructions and usage examples for Create Redwood App | ||
--- | ||
|
||
# Create Redwood App | ||
|
||
To get up and running with Redwood, you can use Create Redwood App: | ||
|
||
```terminal | ||
yarn create redwood-app <your-app-name> | ||
``` | ||
|
||
## 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 higher, 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 (default) 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, here's a recommended 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 | ||
|
||
_NOTE: This prompt will only display if you're running yarn, version 1._ | ||
|
||
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 | Alias | What it does | | ||
| :--- | :--- | :--- | | ||
| `--yarn-install` | | Run `yarn install` | | ||
| `--typescript` | `ts` | Set TypeScript as the preferred language (default to JavaScript) | | ||
| `--overwrite` | | Overwrites the existing directory, if it has the same name | | ||
| `--git-init` | `git` | Initializes a git repository | | ||
| `--commit-message "Initial commit"` | `m` | 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 | ||
``` | ||
|
||
|
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