A sample weather forecast app
It makes use of
babel-cli - 6.24.0
babel-preset-es - 20156.24.0
express - 4.15.2
superagent - 3.5.0
#Accounts needed
- Get your accouts
Get a username here: http://www.geonames.org/login After verifying it, activate it for free web services here: http://www.geonames.org/manageaccount Take note of your username
Get an account here: https://home.openweathermap.org/users/sign_up
Take note of your apikey
#Ubuntu instructions
- Install node
sudo apt-get install nodejs npm -y
- Create a virtual link from node to nodejs
sudo ln -s /usr/bin/nodejs /usr/bin/node
- Install n package
sudo npm install n
- Install nodejs 6
sudo n 6.10.0
- Clone the repository
git clone https://github.com/GabrielFerrarini/WeatherForecastSample.git
or
git clone [email protected]:GabrielFerrarini/WeatherForecastSample.git
-
Update src/geoLocModel to use your geonames username
-
Update src/weatherModel to use your openweathermap api key
-
From inside the Server folder execute
npm install
npm start
- Test
curl -X GET "http://localhost:3000/forecast/Cities/New%20York"
curl -X GET "http://localhost:3000/forecast/us/10001"
curl -X GET "http://localhost:3000/forecast/Cities/Americana"
curl -X GET "http://localhost:3000/forecast/br/13465000"