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, but would much prefer node 20!
These commands need to be run in a BASH SHELL session on your IBM i
Issue the following commands to clone the repo
git clone https://github.com/AndyYouens/f_Weather.git
Change into the f_weather directory
cd \f_Weather
Install dependancies
npm install
To use this application you will need an api key from OpenWeatherMap.
Get an API key by creating an account at OpenWeatherMap
Once you have an API Key, it needs to be made available to the application. Run the following command to achieve this.
export APIKEY=your_key_string
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=your_key_string
PORT=4000
DEBUG=weather
HOSTNAME=GALATEA
The .env file should NOT be included within source control and should be added to your .gitignore file.
Start application
npm start
if you wish to run the application in debug mode, run the following command instead.
npm run debug
Point your favourtie browser to https://your-IBMi:4000
FormaServe Systems Ltd - All work - FormaServe
- MIT license
- © 1990 - 2024 FormaServe Systems Ltd
Andy Youens - FormaServe Systems Ltd - Twitter @AndyYouens
subscribe to our FREE monthly newsletter at (https://powerwire.eu)
© 1990 - 2024 FormaServe Systems Ltd
😉