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

Revert change to http-proxy-middleware docs #5252

Merged
merged 1 commit into from
Oct 2, 2018
Merged
Changes from all 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
6 changes: 4 additions & 2 deletions packages/react-scripts/template/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -869,7 +869,7 @@ yarn upgrade babel-plugin-relay@dev
Then, wherever you use the `graphql` template tag, import the macro:

```js
import graphql from "babel-plugin-relay/macro";
import graphql from 'babel-plugin-relay/macro';
// instead of:
// import { graphql } from "babel-plugin-relay"

Expand Down Expand Up @@ -1211,14 +1211,16 @@ You can now register proxies as you wish! Here's an example using the above `htt
const proxy = require('http-proxy-middleware');

module.exports = function(app) {
app.use('/api', proxy({ target: 'http://localhost:5000/' }));
app.use(proxy('/api', { target: 'http://localhost:5000/' }));
};
```

> **Note:** You do not need to import this file anywhere. It is automatically registered when you start the development server.

> **Note:** This file only supports Node's JavaScript syntax. Be sure to only use supported language features (i.e. no support for Flow, ES Modules, etc).

> **Note:** Passing the path to the proxy function allows you to use globbing and/or pattern matching on the path, which is more flexible than the express route matching.

## Using HTTPS in Development

> Note: this feature is available with `react-scripts@0.4.0` and higher.
Expand Down