Check out example codes for "web-push: command not found". It will help you in understanding the concepts better.

Code Example 1

# first setup the web-push npm install web-push --save # then run  ./node_modules/.bin/web-push generate-vapid-keys

Learn ReactJs, React Native from akashmittal.com