A simple client and server app, client connects with server via API, server calls OpenWeatherMap API to fetch weather info. Client is rendered server side in order to facilitate search engine visibility and to avoid javascript issues on client side.
Clone this repository:
git clone https://github.com/haisham/weather.git
Backend API is actually a wrapper, which is a middleware to communicate with OpenWeatherMap API. This wrapper can be configured to use any weather info service.
First install the required modules, navigate to 'server' folder and run:
npm install
Navigate to server/app/config/, edit config.js and add API Key for OpenWeatherMap API.
Once the modules are installed and API key is set, run server:
npm run server
Tests can be run using:
npm run test
First install the required modules, navigate to 'client' folder and run:
npm install
Once the modules are installed, run client:
npm run start
Best way to run client side tests is using yarn:
yarn jest