This project was created using themetalfleece/nodejs-typescript-template
A Node.js API client for BrightSkyAPI
This library provides a Node.js API interface to BrightSkyAPI.
- Install node.js.
- Clone this repository, and using a terminal navigate to its directory.
- Run
npm ci
to install the dependencies.
- Run
npm build
to build the files. - Run
npm test
to test the library.
import BrightSkyAPI from 'bright-sky-api'
import fetch from 'node-fetch'
const api = BrightSkyAPI({ fetch })
const weather = await api.currentWeather({ lat: '50.51', lon: '13.42' })
- Installing the Eslint (
dbaeumer.vscode-eslint
) and Prettier - Code formatter (esbenp.prettier-vscode
) extensions is recommended.
- Run
npm lint
to lint the code. - Run
npm format
to format the code.
- Run
npm test
to execute all tests. - Run
npm run test:watch
to run tests in watch (loop) mode. - Run
npm run test:coverage
to see the tests coverage report.