Skip to content

LoriqueNET/node-code-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

NodeJS Code Examples

This repository contains working code examples for NodeJS, described in posts made on my website and Medium . What follows is an installation guide and links to examples.

Json Web Token example

In this example the jsonwebtoken library is showcased, with example of how to use a public/private keypair to sign and verify a token.

JWTs are very useful, especially for decoupled software infrastructure architecture such as Microservices, Security First, or Serverless. As technology progresses and more APIs are built to scale, it becomes critical to think about how we deal with authorization, not just authentication.

Example code

Links

Medium.com

My website

Prototyping example

In this example prototyping is showcased using filecaching as an example. We want the methods for setting and getting cache on our API, but we also want to implement TTL for file cache.

Mixins or base classing can be used for the same purpose, but every once in a while you run into issues with both those approaches, and here prototyping is my goto.

Example code

Links

Medium.com

My website

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published