mirror of
https://github.com/microsoft/frontend-bootcamp.git
synced 2026-01-26 14:56:42 +08:00
9 lines
200 B
TypeScript
9 lines
200 B
TypeScript
async function fetchSomething() {
|
|
const response = await fetch('http://localhost:3000/hello');
|
|
return await response.text();
|
|
}
|
|
|
|
fetchSomething().then(text => {
|
|
console.log('hello ' + text);
|
|
});
|