2017-10-09 09:51:10 -07:00
..
2017-10-04 10:56:42 -07:00

Read this on the main serverless docs site

Hello World Ruby Example

Make sure serverless is installed.

1. Create a service

serverless create --template spotinst-ruby --path serviceName serviceName is going to be a new directory there the python template will be loaded. Once the download is complete change into that directory

2. Deploy

serverless deploy

3. Invoke deployed function

serverless invoke --function hello

In your terminal window you should see the response

{
Deploy functions:
	hello: created
Service Information
	service: spotinst-ruby
	functions:
  		hello
}

Congrats you have just deployed and ran your Hello World function!

Short Hand Guide

sls is short hand for serverless cli commands

-f is short hand for --function

-t is short hand for --template

-p is short hang for --path