TypeScript
55 words
One minute
Initialize project
1
2
| npm i tsc
npx tsc --init
|
UUID
1
2
3
4
5
| npm install @types/uuid uuid;
import {v4 as UUID} from 'uuid';
let uuid = UUID();
|
request
1
2
3
4
5
6
7
| const response = await fetch("http://localhost:8080", {
method: "POST",
body: jsonRPCBody,
Headers: {
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
},
});
|