This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useApi} from "~/hooks/useApi" | |
const UsersPage = () => { | |
type UsersType = { | |
firstName: string; | |
lastName: string; | |
} | |
const [usersResponse, getUsers] = useApi<UsersType[]>(fetchUsers, []); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var proxy = require('express-http-proxy'); | |
var app = require('express')(); | |
var cors = require('cors'); | |
app.use(cors()); | |
app.use('/proxy', proxy('https://api1-yfo.eq2.triple-it.nl/')); | |
app.listen(3002, () => console.log(`Example app listening on port ${3002}!`)); | |
// use this to solve CORS-problems from localhost |