Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- app.get('/api', async (req, res, next) => {
- const options = {
- headers: { 'Authorization': config.API.access_token }
- };
- let response = await fetch(config.API.url, options);
- let historianData = await response.json();
- console.log(historianData); // deactivate when client is ready
- res.send(historianData); // activate when client is ready
- next();
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement