A weather forecast app written in JavaScript using NodeJS, express.js
Darksky.net -- for address geocode finding by word Mapbox.com -- for getting weather data for query location
nodejs
installednpm
installed
cd node-weather-app
npm install
Put your tokens for mapbox api and darksky api in
config/dev.env
MAPBOX_TOKEN=l12k3j4ljLKJDh2l3kh4j
DARKSKY_TOKEN=KJDHSFLKJlkj3hkj3hlkJLD
Get them for free with non payed subscription form these services accordingly: Darksky.net -- for address geocode finding by word Mapbox.com -- for getting weather data for query location
export PORT=3000 # if run on your local. on heroku this var is set already for you
export MAPBOX_TOKEN=put-your-token-here
export DARKSKY_TOKEN=put-your-token-here
npm run
When pushed your app to heroku repository,
you need to set environment varibales using
heroku config
More info here
heroku config:set MAPBOX_TOKEN=l12k3j4ljLKJDh2l3kh4j
DARKSKY_TOKEN=KJDHSFLKJlkj3hkj3hlkJLD
- Change port number on which you want server to run in
config/dev.env
- Also set your tokens for MAPBOX_TOKEN and DARKSKY_TOKEN in
config/dev.env
npm run dev