... in the previous chapters...
How to create a simple HTTP API with authentication with Node.js?
In this example we'll see how to create an HTTP API with 3 main components: Signup, Login and a login-only route. Let's start by setting up a new project and including Express for handling the routes, JSON Web Token to handle auto-expiring tokens, and bcrypt to encrypt user passwords. Initialize the new project in an empty folder. We'll name the main file
index.mjs
to utilize top level awaits and have import/export functionality.npm init -y npm i --save express jsonwebtoken bcrypt
...How to save a web page as PNG or PDF with Nightmare?
Introduction In this example we'll see how to utilize Nightmare, Xvfb and how to properly bootstrap the main application code in order to make a cross-platform HTML → PDF script.
Let's start by initializing our application packages and preparing the application index.js. While we are in our new application folder, let's create a default package.json and install the packages:
Let's start by initializing our application packages and preparing the application index.js. While we are in our new application folder, let's create a default package.json and install the packages:
npm init -y npm i --save nightmare @cypress/xvfb...