You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: hub/dev-environment/javascript/gatsby-on-wsl.md
+6-8Lines changed: 6 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ We recommend using the Windows Subsystem for Linux when working with NodeJS apps
34
34
35
35
To create a Gatsby.js project:
36
36
37
-
1. Open your WSL terminal (ie. Ubuntu 18.04).
37
+
1. Open your WSL terminal (ie. Ubuntu).
38
38
2. Create a new project folder: `mkdir GatsbyProjects` and enter that directory: `cd GatsbyProjects`
39
39
3. Use npm to install the Gatsby CLI: `npm install -g gatsby-cli`. Once installed, check the version with `gatsby --version`.
40
40
4. Create your Gatsby.js project: `gatsby new my-gatsby-app`
@@ -50,19 +50,17 @@ To create a Gatsby.js project:
50
50
51
51
Open the WSL terminal integrated in VS Code (**View > Terminal**). Make sure that the terminal path is pointed to your project directory (ie. `~/GatsbyProjects/my-gatsby-app$`). Then try running a development instance of your new app using: `gatsby develop`
52
52
53
-
7. Once your new Gatsby project finishes compiling, your terminal will display that "You can now view gatsby-starter-default in the browser. `http://localhost:8000/`." Select this localhost link to view your new project built in a web browser.
53
+
7. Once your new Gatsby project finishes compiling, your terminal will display.`You can now view gatsby-starter-default in the browser. http://localhost:8000/`. Select this localhost link to view your new project built in a web browser.
54
54
55
55
> [!NOTE]
56
-
> You'll notice that your terminal output also let's you know that you can "View GraphiQL, an in-browser IDE, to explore your site's data and schema: `http://localhost:8000/___graphql`." GraphQL consolidates your APIs into a self-documenting IDE (GraphiQL) built into Gatsby. In addition to exploring your site's data and schema, you can perform GraphQL operations such as queries, mutations, and subscriptions. For more info, see [Introducing GraphiQL](https://www.gatsbyjs.org/docs/running-queries-with-graphiql/).
56
+
> You'll notice that your terminal output also let's you know that you can "View GraphiQL, an in-browser IDE, to explore your site's data and schema: `http://localhost:8000/___graphql`." GraphQL consolidates your APIs into a self-documenting IDE (GraphiQL) built into Gatsby. In addition to exploring your site's data and schema, you can perform GraphQL operations such as queries, mutations, and subscriptions. For more info, see [Introducing GraphiQL](https://www.gatsbyjs.com/docs/how-to/querying-data/running-queries-with-graphiql/).
57
57
58
-
8. Open the `src/pages/index.js` file in your VS Code editor. Find the page title `<h1 >Hi people</h1>` and change it to `<h1 >Hi (Your Name)!</h1>`. With your web browser still open to localhost:8000, save your change and notice the hot-reloading feature automatically compile and update your change in the browser.
58
+
8. Open the `src/pages/index.js` file in your VS Code editor. Find the page title `<h1>Welcome to <b>Gatsby!</b></h1>` and change it to `<h1>Hello <b>World!</b></h1>`. With your web browser still open to `http://localhost:8000`, save your change and notice the hot-reloading feature automatically compile and update your change in the browser.
59
59
60
60

61
61
62
-
9. Let's see how Next.js handles errors. Remove the `</h1>` closing tag so that your title code now looks like this: `<h1>Hi (Your Name)!`. Save this change and notice that a "Failed to compile" error will display in your browser, and in your terminal, letting your know that a closing tag for `<h1>` is expected. Replace the `</h1>` closing tag, save, and the page will reload.
63
-
64
-
You can use VS Code's debugger with your Next.js app by selecting the F5 key, or by going to **View > Debug** (Ctrl+Shift+D) and **View > Debug Console** (Ctrl+Shift+Y) in the menu bar. If you select the gear icon in the Debug window, a launch configuration (`launch.json`) file will be created for you to save debugging setup details. To learn more, see [VS Code Debugging](https://code.visualstudio.com/docs/nodejs/nodejs-debugging).
62
+
You can use VS Code's debugger with your Gatsby app by selecting the F5 key, or by going to **View > Debug** (Ctrl+Shift+D) and **View > Debug Console** (Ctrl+Shift+Y) in the menu bar. If you select the gear icon in the Debug window, a launch configuration (`launch.json`) file will be created for you to save debugging setup details. To learn more, see [VS Code Debugging](https://code.visualstudio.com/docs/nodejs/nodejs-debugging).
65
63
66
64

67
65
68
-
To learn more about Gatsby, see the [Gatsby.js docs](https://www.gatsbyjs.org/docs/).
66
+
To learn more about Gatsby, see the [Gatsby.js docs](https://www.gatsbyjs.com/docs/).
0 commit comments