Team Updates

fdvFernando David Vicente Márquez
Alert App Demo
Alert App Demo
G
Gema Pizana Antón
Keep ToDos in common
Keep ToDos in common
G
Gema Pizana Antón
Team Stream Item
fdvFernando David Vicente Márquez
Team Stream Item
fdvFernando David Vicente Márquez
Team Stream Item
fdvFernando David Vicente Márquez
Team Stream Item
fdvFernando David Vicente Márquez
const _ = require('lodash')
const axios = require('axios');
const geolib = require('geolib');
const nodexml = require('nodexml');
module.exports = function(config) {
const AemetAlerts = require('./aemet-alerts.js')(config);
const NasaAlerts = require('./nasa-alerts.js')(config);
const alertByGeoLoc = async (req, res, next) => {
const lat = req.params.lat;
const long = req.params.long;
try {
const aemetAlerts = await AemetAlerts.alertByGeoLoc (lat, long);
const nasaAlerts = await NasaAlerts.alertByGeoLoc (lat, long);
const allAlerts = [].concat (nasaAlerts, aemetAlerts);
return res.json(allAlerts).end();
}
catch (err) {
return res.status(400).json({
error: err.message
});
}
}
const mapByGeoLoc = async (req, res, next) => {
const lat = req.params.lat;
const long = req.params.long;
try {
const mapUrl = await AemetAlerts.mapByGeoLoc (lat, long);
return res.json(mapUrl).end();
}
catch (err) {
return res.status(400).json({
error: err.message
});
}
}
return {
alertByGeoLoc: alertByGeoLoc,
mapByGeoLoc: mapByGeoLoc
}
}
view raw alerts.js hosted with ❤ by GitHub
G
Gema Pizana Antón
Creating the presentation
Creating the presentation
G
Gema Pizana Antón
App loading alerts
App loading alerts
G
Gema Pizana Antón
Design Phase
Design Phase
G
Gema Pizana Antón
Team Stream Item
fdvFernando David Vicente Márquez
Team Stream Item
fdvFernando David Vicente Márquez
NASA Logo

SpaceApps is a NASA incubator innovation program.