test cors
This commit is contained in:
parent
943865b2c1
commit
0d0e8a8a62
3 changed files with 27 additions and 17 deletions
20
src/App.js
20
src/App.js
|
|
@ -1,8 +1,18 @@
|
|||
import React, { Component } from 'react';
|
||||
import logo from './logo.svg';
|
||||
import './App.css';
|
||||
import React, { Component } from 'react'
|
||||
import logo from './logo.svg'
|
||||
import './App.css'
|
||||
|
||||
class App extends Component {
|
||||
componentDidMount() {
|
||||
console.log('fetch items')
|
||||
fetch('https://adoring-clarke-f30908.netlify.com/.netlify/functions/todos-read-all')
|
||||
.then((response) => {
|
||||
return response.json()
|
||||
})
|
||||
.then((myJson) => {
|
||||
console.log(myJson)
|
||||
})
|
||||
}
|
||||
render() {
|
||||
return (
|
||||
<div className="App">
|
||||
|
|
@ -14,8 +24,8 @@ class App extends Component {
|
|||
Using FaunaDB & netlify functions
|
||||
</p>
|
||||
</div>
|
||||
);
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default App;
|
||||
export default App
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue