Skip to content

Commit

Permalink
fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
vemonet committed Dec 6, 2023
1 parent 0f6d0bc commit b77cbe4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/docs/use_javascript.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,12 @@ npx http-server
python -m http.server
```

The nanopub test server is used if the last argument of `Nanopub.publish` is an empty string, to easily publish to a production server use `get_np_server()`:
The nanopub test server is used if the last argument of `Nanopub.publish` is an empty string, to easily publish to a production server use `getNpServer()`:

```typescript
import init, { Nanopub, NpProfile, get_np_server } from "https://unpkg.com/@nanopub/sign";
import init, { Nanopub, NpProfile, getNpServer } from "https://unpkg.com/@nanopub/sign";

const np = await new Nanopub(rdfStr).publish(profile, get_np_server());
const np = await new Nanopub(rdfStr).publish(profile, getNpServer());
```

## 📥️ Install
Expand Down Expand Up @@ -127,7 +127,7 @@ For example, to use it in a nextjs react app:
```typescript
'use client'
import { useEffect, useState } from 'react';
import init, { Nanopub, NpProfile, get_np_server } from "@nanopub/sign";
import init, { Nanopub, NpProfile } from "@nanopub/sign";
export default function Home() {
const [rdfOutput, setRdfOutput] = useState('');
Expand Down

0 comments on commit b77cbe4

Please sign in to comment.