Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
akira-cn authored Aug 12, 2023
1 parent 1bce66b commit 570c8a3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ app.post('/save', async (context) => {

```js
// in browser
...
const res = await fetch('https://<server.url>:<port>/save', {
method: 'POST',
body: JSON.stringify(data),
Expand All @@ -28,6 +29,7 @@ const res = await fetch('https://<server.url>:<port>/save', {
}
);
const result = await res.json();
...
```
Embrace the future of coding with modular capabilities:
Expand All @@ -45,7 +47,7 @@ app.all('/action', modular({save, list, delete}, config.koa));
```js
// in browser
import {save, list, delete} from 'https://<server.url>:<port>/action';

...
const result = await save(data); // done!
...
```
Expand Down

0 comments on commit 570c8a3

Please sign in to comment.