clarify credentials
This commit is contained in:
parent
d5b38ea3ed
commit
abaa3b2ae9
15
README.md
15
README.md
|
@ -31,17 +31,24 @@ requires setting environment variables, for example:
|
|||
|
||||
```
|
||||
export WINGS_ENDPOINT=https://api.wings.dev
|
||||
export WINGS_PROJECT=amsterdam.bij1.org
|
||||
export WINGS_PROJECT=<PROJECT_ID>
|
||||
export WINGS_APP_KEY=<APP_KEY>
|
||||
```
|
||||
|
||||
These credentials can be generated by adding an App in the Wings admin
|
||||
backend.
|
||||
|
||||
## `yarn migrate`
|
||||
|
||||
Converts all articles and pages that do not exist in WordPress yet and
|
||||
publishes them along with their media, requires setting environment variables, for example:
|
||||
publishes them along with their media, requires setting environment
|
||||
variables, for example:
|
||||
|
||||
```
|
||||
export WP_ENDPOINT=http://localhost:8000/wp-json
|
||||
export WP_USER=<user>
|
||||
export WP_PASSWORD=<pw>
|
||||
export WP_USER=<USERNAME>
|
||||
export WP_PASSWORD=<APPLICATION_PASSWORD>
|
||||
```
|
||||
|
||||
Note that using this API requires a specific application password
|
||||
which can be generated from the user management page.
|
||||
|
|
|
@ -7,7 +7,7 @@ console.log(query);
|
|||
got.post(process.env.WINGS_ENDPOINT || 'https://api.wings.dev', {
|
||||
headers: {
|
||||
"Authorization": "Bearer " + process.env.WINGS_APP_KEY,
|
||||
"x-wings-app-domain": process.env.WINGS_PROJECT
|
||||
"X-Wings-Project": process.env.WINGS_PROJECT
|
||||
},
|
||||
json: {query}
|
||||
}).json().then((data) => {
|
||||
|
|
Loading…
Reference in New Issue