1
0

Initial commit

This commit is contained in:
Eric Lewin
2020-08-23 21:48:06 -05:00
commit 162ce47bc6
57 changed files with 12096 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
const axios = require("axios");
/**
* Gets coordinates from an external API
*
*/
function getCoords(req, res) {
axios
.get("https://freegeoip.app/json/")
.then((result) => {
return res.status(result.status).json(result.data).end();
})
.catch((err) => {
return res.status(500).json(err).end();
});
}
module.exports = {
getCoords,
};