this is a service that authenticates the API calls against the jsonapi server
it also does some specific work for the application it is loosely tight (like for example securing some api calls)
this service uses https://www.npmjs.com/package/config for managing configuration
by default you will find in the ./config/default.js that jsonApiServer is expected to be on the localhost:3000
you can change it by providing a config file like production.js and spinning up the server like
NODE_ENV=lan node index.js
-
copy contents of https://github.com/jedrula-communications/jwt-auth/blob/master/bin/build to a file on the server like build_jwt-auth
-
sh build_jwt-auth
-
cd jwt-auth-master
-
spin it
node index.js
4.1. ... as a service
sudo forever-service install jwt-auth-master --script index.js -e "NODE_ENV=lan"
sudo service jwt-auth-master start