Serverless is a Node.js CLI tool so the first thing you need to do is to install Node.js on your machine.
You can verify that Node.js is installed successfully by runnning
node --version in your terminal. You should see the corresponding Node version number printed out.
Next, install the Serverless Framework via npm which was already installed when you installed Node.js.
Open up a terminal and type
npm install -g serverless to install Serverless.
npm install -g serverless
Once the installation process is done you can verify that Serverless is installed successfully by running the following command in your terminal:
To see which version of serverless you have installed run:
Install the latest package from npm by running:
npm install --save serverless-google-cloudfunctions
To run Serverless commands that issue requests to the Google Cloud, you will need to setup your Google Cloud credentials on your machine.