This repository has been archived on 2024-10-02. You can view files and clone it, but cannot push or open issues or pull requests.
2021-03-10 15:27:43 +00:00
|
|
|
const express = require('express');
|
|
|
|
const got = require('got');
|
|
|
|
const app = express();
|
|
|
|
const port = 9999;
|
|
|
|
|
|
|
|
app.get('/', async(req, res) => {
|
|
|
|
(async() => {
|
2021-03-18 10:38:05 +00:00
|
|
|
const {body} = await got.get('http://app.etiquetaselectronicas.com:9999/user/getErpPublicKey', {
|
2021-03-10 15:27:43 +00:00
|
|
|
});
|
2021-03-18 10:38:05 +00:00
|
|
|
let body2 = JSON.parse(body);
|
|
|
|
console.log(body2.data);
|
2021-03-10 15:27:43 +00:00
|
|
|
res.end(body);
|
2021-03-18 10:38:05 +00:00
|
|
|
})();
|
2021-03-10 15:27:43 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
app.listen(port, () => {
|
2021-03-18 10:38:05 +00:00
|
|
|
console.log(`Example app listening at http://localhost:${port}`);
|
|
|
|
});
|