18 lines
531 B
TypeScript
18 lines
531 B
TypeScript
import { ubicacion } from "./clima.js";
|
|
|
|
export const weatherUrl = process.env.WEATHER_URL || '' as const,
|
|
weatherApiKey = process.env.WEATHER_API_KEY || '' as const,
|
|
commandInput = process.argv[2] || '' as const;
|
|
|
|
if (weatherUrl === '' || weatherApiKey === '' || commandInput === '') {
|
|
console.error('WEATHER_URL', weatherUrl);
|
|
console.error('WEATHER_API_KEY', weatherApiKey);
|
|
console.error('Ciudad', commandInput);
|
|
process.exit(0);
|
|
}
|
|
|
|
const busqueda = await ubicacion(commandInput, 3);
|
|
|
|
console.log('busqueda', busqueda);
|
|
|