Crear mecanografiado de token JWT

//The recommended way is to generate your token on the serverside, anyway:
npm install jsonwebtoken --save
npm install @types/jsonwebtoken --save

import * as jwt from 'jsonwebtoken';

let token = jwt.sign({ anyObject: 'here..' }, 'your super secret password!!');
MitchAloha