Hypere API

node v14.20.1
version: 2.0.0
endpointsharetweet
const axios = require('axios'); const send = (obj, res) => { const body = JSON.stringify(obj); res.writeHead(200, { 'Content-Length': body.length, 'Content-Type': 'application/json' , 'Access-Control-Allow-Origin': '*', 'Access-Control-Allow-Methods': '*', }); res.end(body) }; exports.endpoint = async (req, res) => { const { data } = await axios.get('http://140.83.80.85:8153/api/status'); send(data, res) }
Loading…

no comments

    sign in to comment