Skip to content

Commit a2d0ef8

Browse files
authored
chore(docs): add http to localhost (#28896)
1 parent 247b1dc commit a2d0ef8

File tree

6 files changed

+15
-15
lines changed

6 files changed

+15
-15
lines changed

docs/docs/how-to/plugins-and-themes/creating-a-generic-plugin.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ exports.sourceNodes = ({ actions, createNodeId, createContentDigest }) => {
5353
}
5454
```
5555

56-
The above code block creates a node called `"Test Node"` as seen from the `title` parameter. If this process is successful restarting the server will make the `allTestNode` query available at `localhost:8000/___graphql`.
56+
The above code block creates a node called `"Test Node"` as seen from the `title` parameter. If this process is successful restarting the server will make the `allTestNode` query available at `http://localhost:8000/___graphql`.
5757

5858
> Libraries like [Axios](https://www.npmjs.com/package/axios) can be used to handle calls in the `gatsby-node.js` file
5959

docs/docs/how-to/plugins-and-themes/creating-a-source-plugin.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ exports.sourceNodes = async ({
269269
// ...
270270
```
271271
272-
You can read about each of the packages that are working together in [Apollo's docs](https://www.apollographql.com/docs/react/). The end result is creating a `client` that you can use to call methods like `query` to get data from the source it's configured to work with. In this case, that is `localhost:4000` where you should have the API running. If you can't configure the API to run locally, you can update the URLs for the client to use `gatsby-source-plugin-api.glitch.me` where a version of the API is deployed, instead of `localhost:4000`.
272+
You can read about each of the packages that are working together in [Apollo's docs](https://www.apollographql.com/docs/react/). The end result is creating a `client` that you can use to call methods like `query` to get data from the source it's configured to work with. In this case, that is `http://localhost:4000` where you should have the API running. If you can't configure the API to run locally, you can update the URLs for the client to use `gatsby-source-plugin-api.glitch.me` where a version of the API is deployed, instead of `http://localhost:4000`.
273273

274274
#### Query data from the API
275275

@@ -924,8 +924,8 @@ You can test that this is working by running the site again and updating one of
924924
925925
Follow these steps to test it out:
926926
927-
1. Open up your site at `localhost:8000` after you run `gatsby develop`
928-
2. Open up the GraphQL playground at `localhost:4000` (if you are running the `api` folder locally) or `https://gatsby-source-plugin-api.glitch.me/` and first run a query for posts:
927+
1. Open up your site at `http://localhost:8000` after you run `gatsby develop`
928+
2. Open up the GraphQL playground at `http://localhost:4000` (if you are running the `api` folder locally) or `https://gatsby-source-plugin-api.glitch.me/` and first run a query for posts:
929929

930930
```graphql
931931
query {

docs/tutorial/using-multiple-themes-together.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ module.exports = {
7878
gatsby develop
7979
```
8080

81-
4. Checkout `localhost:8000` to see what is currently there.
81+
4. Checkout `http://localhost:8000` to see what is currently there.
8282

8383
## Add content
8484

examples/creating-source-plugins/README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -22,23 +22,23 @@ _Note: if you aren't using yarn, you can navigate into each of the 3 folders and
2222

2323
Then you can run the api or example projects in separate terminal windows with the commands below.
2424

25-
For the API which runs at `localhost:4000`, use this command:
25+
For the API which runs at `http://localhost:4000`, use this command:
2626

2727
```
2828
yarn workspace api start
2929
```
3030

31-
And to run the example site with `gatsby develop` at `localhost:8000`, use this command:
31+
And to run the example site with `gatsby develop` at `http://localhost:8000`, use this command:
3232

3333
```
3434
yarn workspace example-site develop
3535
```
3636

37-
Running the example site also runs the plugin because it is included in the site's config. You'll see output in the console for different functionality and then can open up the browser to `localhost:8000` to see the site.
37+
Running the example site also runs the plugin because it is included in the site's config. You'll see output in the console for different functionality and then can open up the browser to `http://localhost:8000` to see the site.
3838

3939
## Developing and Experimenting
4040

41-
You can open up `localhost:4000` with the API running, which will load a GraphQL Playground, which is a GraphQL IDE (like GraphiQL, that Gatsby runs at `localhost:8000/___graphql`) for running queries and mutations on the data from the API.
41+
You can open up `http://localhost:4000` with the API running, which will load a GraphQL Playground, which is a GraphQL IDE (like GraphiQL, that Gatsby runs at `http://localhost:8000/___graphql`) for running queries and mutations on the data from the API.
4242

4343
You can test a query like this to see data returned:
4444

@@ -53,7 +53,7 @@ query {
5353

5454
This query will return the IDs for all posts in the API. You can copy one of these IDs and provide it as an argument to a mutation to update information about that post.
5555

56-
You can run 3 different mutations from the GraphQL Playground (at `localhost:4000`): `createPost`, `updatePost`, and `deletePost`. These methods would mimic CRUD operations happening on the API of the data source like a headless CMS. An example `updatePost` mutation is outlined below.
56+
You can run 3 different mutations from the GraphQL Playground (at `http://localhost:4000`): `createPost`, `updatePost`, and `deletePost`. These methods would mimic CRUD operations happening on the API of the data source like a headless CMS. An example `updatePost` mutation is outlined below.
5757

5858
When you run a mutation on a post, a subscription event is published, which lets the plugin know it should respond and update nodes. The following mutation can be copied into the left side of the GraphQL playground so long as you replace "post-id" with a value returned for an ID from a query (like the one above).
5959

packages/gatsby-admin/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Or in the `scripts` section of your `package.json`:
2626
}
2727
```
2828

29-
Once you run `gatsby develop` with the flag enabled, you can visit `localhost:8000/___admin` to view Admin for your Gatsby site!
29+
Once you run `gatsby develop` with the flag enabled, you can visit `http://localhost:8000/___admin` to view Admin for your Gatsby site!
3030

3131
![Gatsby Admin homepage showing a list of installed plugins, as well as a search input to search for plugins to install](https://user-images.githubusercontent.com/7525670/95580804-36df9200-0a38-11eb-80a7-fbd847a13da1.png)
3232

@@ -58,7 +58,7 @@ It also listens to the [`gatsby develop` status server](https://github.com/gatsb
5858

5959
To discover where they are (and whether they are already running) there is a service discovery mechanism in `gatsby-core-utils`. It stores the ports of the running Gatsby site(s) at `~/.config/gatsby/sites/<pathhash>/<servername>.json`.
6060

61-
Admin can then fetch `localhost:8000/___services` (where `:8000` is the well-known port of the running site), which returns a list of all the random ports used by the site:
61+
Admin can then fetch `http://localhost:8000/___services` (where `:8000` is the well-known port of the running site), which returns a list of all the random ports used by the site:
6262

6363
```
6464
$ curl http://localhost:8000/___services | jq
@@ -75,7 +75,7 @@ $ curl http://localhost:8000/___services | jq
7575
}
7676
```
7777

78-
That's how the Admin frontend knows to connect to `localhost:50400/graphql` to connect to the GraphQL server, and `localhost:60731` to connect to the develop status server.
78+
That's how the Admin frontend knows to connect to `http://localhost:50400/graphql` to connect to the GraphQL server, and `http://localhost:60731` to connect to the develop status server.
7979

8080
#### Production Deployment
8181

@@ -111,4 +111,4 @@ $ gatsby-dev --packages gatsby gatsby-cli gatsby-recipes gatsby-core-utils gatsb
111111
$ GATSBY_EXPERIMENTAL_ENABLE_ADMIN=true gatsby develop
112112
```
113113

114-
Then visit `localhost:8000/\_\_\_admin` and you should see Gatsby Admin for your site!
114+
Then visit `http://localhost:8000/\_\_\_admin` and you should see Gatsby Admin for your site!

packages/gatsby-design-tokens/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -242,4 +242,4 @@ with
242242
const header = system
243243
```
244244
245-
and you should see `Futura PT` turning into `system-ui` within a few moments on your `localhost:8000`.
245+
and you should see `Futura PT` turning into `system-ui` within a few moments on your `http://localhost:8000`.

0 commit comments

Comments
 (0)