This repo contains a NodeJS Express website that runs on IBM i.
It shows a weather app giving the current weather for a city in the UK.
Requires Node.js on IBM i at least version 8
These commands need to be run in a QSHELL session on your IBM i
Issue the following commands to clone the repo
git clone https://github.com/AndyYouens/f_Weather.git
CD into directory
cd f_Weather
Install dependancies
npm install
Get API key by creating an account at OpenWeatherMap
Start application
APIKEY=<your_api_key>
export APIKEY
npm start (to run in debug mode, type npm run debug)
Point your browser to https://your-IBMi:4000
Save yourself time by placing your API key in a .env file in the root of this application.
Additionally, if you wish to change the PORT number this application runs on, this also can be placed in the .env file.
An example .env file is shown below.
APIKEY=58fe301faedc550510e8b2dd6222449x
PORT=4000
DEBUG=weather
HOSTNAME=GALATEA
The .env file should NOT be included within source control and should be added to your .gitignore file.
FormaServe Systems Ltd - All work - FormaServe
- MIT license
- © 1990 - 2020 FormaServe Systems Ltd
Andy Youens - FormaServe Systems Ltd - Twitter @AndyYouens
Andy Youens - August 2020
September 2020
© 1990 - 2020 FormaServe Systems Ltd
😉