test cors

This commit is contained in:
davidwells 2018-06-11 17:19:14 -07:00
parent 943865b2c1
commit 0d0e8a8a62
3 changed files with 27 additions and 17 deletions

View file

@ -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