Skip to content

Commit

Permalink
Merge pull request #73 from nevermined-io/fix/proxy_endpoints
Browse files Browse the repository at this point in the history
Small fixes
  • Loading branch information
aaitor committed Jul 5, 2023
2 parents f1d13fe + e031560 commit b42707a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 13 deletions.
8 changes: 4 additions & 4 deletions docs/tutorials/08-webservice-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Each web service will show a key icon at the right hand side. If you click on th

The JWT token is the access key identifying you as a subscriber. It allows you to make HTTP requests to the web service. Once you have it, you can make requests to all the endpoints that are included in the web service that you subscribed to.

Copy both the JWT token and the Proxy url for the network you're using (e.g. https://proxy.mumbai.nevermined.network/). You need these to enable your app to send HTTP requests.
Copy both the JWT token and the Proxy url for the network you're using (e.g. https://proxy.mumbai.nevermined.app/). You need these to enable your app to send HTTP requests.

### 3. Use the JWT to call the service

Expand All @@ -53,9 +53,9 @@ export $JWT_TOKEN=””
export REQUEST_DATA='{"queries": [{"query": "Adam And Evil", "filter": {}, "top_k": 1 }]}'

# With curl we make a POST request and we add the $JWT_TOKEN as Bearer token in the Authorization header
# The url where we send the request is the host name of the proxy: "https://proxy.nevermined.network" plus the endpoint of the service
# The url where we send the request is the host name of the proxy: "https://proxy.mumbai.nevermined.app" plus the endpoint of the service
# we are calling, int this case "/ask"
curl -k -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $JWT_TOKEN" -d "$REQUEST_DATA" https://proxy.nevermined.network/ask
curl -k -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $JWT_TOKEN" -d "$REQUEST_DATA" https://proxy.mumbai.nevermined.app/ask

{"response":"\nThe song is about a person who is in love with someone who is not perfect, but they cannot live without them. Despite knowing that loving this person will bring heartache, they are willing to take the risk and accept the consequences. The song also compares the relationship to the story of Adam and Eve, with the person in the song being like Adam and their love interest being like Eve.","source_nodes":[{"node":{"text":"...","doc_id":"8e748293-f8d2-41b8-a225-7479455b1899","embedding":null,"doc_hash":"451d68b33de1e8034e48c6a98865364e52edd02837f06c34c662ba6d6d462c76","extra_info":null,"node_info":{"start":0,"end":1030},"relationships":{"1":"did:nv:3e0a13a6dba0ab20e83bf25c3e820af8b71c94cea0ab0763b4f822a6998009e6"}},"score":0.7585169416635178}],"extra_info":null}
```
Expand All @@ -64,7 +64,7 @@ curl -k -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $
#### 3.b Using typescript to integrate the web service

```typescript
const proxyEndpoint = `https://proxy.nevermined.network/ask`
const proxyEndpoint = `https://proxy.mumbai.nevermined.app/ask`
const requestData = '{"queries": [{"query": "Adam And Evil", "filter": {}, "top_k": 1 }]}'

opts.headers = {
Expand Down
18 changes: 11 additions & 7 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ const config = {
{
position: 'left',
label: 'App',
href: 'https://mumbai.nevermined.app/'
href: 'https://nevermined.app/'
},
{
position: 'right',
Expand All @@ -125,34 +125,38 @@ const config = {
label: 'Tutorials',
to: 'docs/tutorials',
},
{
label: 'FAQ',
to: '/docs/getting-started/faq',
},
],
},
{
title: 'Nevermined App',
items: [
{
label: 'Arbitrum One',
to: 'https://nevermined.app/',
href: 'https://nevermined.app/',
},
{
label: 'Polygon Matic',
to: 'https://matic.nevermined.app/',
href: 'https://matic.nevermined.app/',
},
{
label: 'Gnosis',
to: 'https://gnosis.nevermined.app/',
href: 'https://gnosis.nevermined.app/',
},
{
label: 'Arbitrum Goerli',
to: 'https://goerli.nevermined.app/',
href: 'https://goerli.nevermined.app/',
},
{
label: 'Polygon Mumbai',
to: 'https://matic.nevermined.app/',
href: 'https://matic.nevermined.app/',
},
{
label: 'Gnosis Chiado',
to: 'https://chiado.nevermined.app/',
href: 'https://chiado.nevermined.app/',
},
],
},
Expand Down
4 changes: 2 additions & 2 deletions src/components/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import { Chains, Wagmi } from '@nevermined-io/providers'

export const appConfig = (): NeverminedOptions => ({
web3ProviderUri: 'https://matic-mumbai.chainstacklabs.com',
neverminedNodeUri: 'https://node.mumbai.public.nevermined.network',
neverminedNodeUri: 'https://node.mumbai.public.nevermined.app',
verbose: 2,
neverminedNodeAddress: '0x5838B5512cF9f12FE9f2beccB20eb47211F9B0bc',
graphHttpUri: 'https://api.thegraph.com/subgraphs/name/nevermined-io/public',
marketplaceAuthToken: AuthToken.fetchMarketplaceApiTokenFromLocalStorage().token,
marketplaceUri: 'https://marketplace-api.mumbai.public.nevermined.network',
marketplaceUri: 'https://marketplace-api.mumbai.public.nevermined.app',
artifactsFolder: `${location.protocol}//${location.host}/contracts`,
})

Expand Down

0 comments on commit b42707a

Please sign in to comment.