mirror of
https://github.com/serverless/serverless.git
synced 2026-01-25 15:07:39 +00:00
commit
ae3d71198e
@ -11,11 +11,9 @@ Let's start by installing Node.js and Serverless.
|
||||
|
||||
## Installing Node.js
|
||||
|
||||
Serverless is a [Node.js](https://nodejs.org) CLI tool so the first thing you need to do is to install Node.js on your
|
||||
machine.
|
||||
Serverless is a [Node.js](https://nodejs.org) CLI tool so the first thing you need to do is to install Node.js on your machine.
|
||||
|
||||
Go to the official [Node.js website](https://nodejs.org), download and follow the
|
||||
[installation instructions](https://nodejs.org/en/download/) to install Node.js on your local machine.
|
||||
Go to the official [Node.js website](https://nodejs.org), download and follow the [installation instructions](https://nodejs.org/en/download/) to install Node.js on your local machine.
|
||||
|
||||
**Note:** Serverless runs on Node v4 or higher. So make sure that you pick a recent Node version.
|
||||
|
||||
|
||||
@ -6,6 +6,7 @@ layout: Doc
|
||||
-->
|
||||
|
||||
# Serverless Variables
|
||||
|
||||
The Serverless framework provides a powerful variable system to give your `serverless.yml` configuration file extra flexibility. With Serverless Variables, you'll be able to do the following:
|
||||
|
||||
- Reference & load variables from environment variables
|
||||
|
||||
@ -35,7 +35,7 @@ Unfortunately, the frameworks functionality is growing so fast, we can't yet off
|
||||
|
||||
Most AWS services require you to have a credit card set up, otherwise you can't deploy your resources and the following error message will appear:
|
||||
|
||||
`AWS Access Key Id needs a subscription for the service`
|
||||
>AWS Access Key Id needs a subscription for the service
|
||||
|
||||
If you created a new AWS account make sure that a credit card is set up for the account.
|
||||
|
||||
@ -46,7 +46,7 @@ To start using Serverless and access the AWS API you need to set the AWS API Acc
|
||||
#### Quick Setup
|
||||
As a quick setup to get started you can export them as environment variables so they would be accessible to Serverless and the AWS SDK in your shell:
|
||||
|
||||
```
|
||||
```bash
|
||||
export AWS_ACCESS_KEY_ID=<key>
|
||||
export AWS_SECRET_ACCESS_KEY=<secret>
|
||||
serverless deploy
|
||||
@ -55,7 +55,7 @@ serverless deploy
|
||||
|
||||
For a more permanent solution you can also set up credentials through the `aws-cli`, or by configuring the credentials file of the `aws-cli` directly. To set them up through the `aws-cli` [install it first](http://docs.aws.amazon.com/cli/latest/userguide/installing.html) then run `aws configure` [to configure the aws-cli and credentials](http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html). Serverless will automatically use those credentials. You can even set up a different profiles for different accounts, which can be used by Serverless as well.
|
||||
|
||||
```
|
||||
```bash
|
||||
$ aws configure
|
||||
AWS Access Key ID [None]: AKIAIOSFODNN7EXAMPLE
|
||||
AWS Secret Access Key [None]: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
|
||||
|
||||
@ -4,7 +4,7 @@ menuText: Cloudformation Resource Reference
|
||||
layout: Doc
|
||||
-->
|
||||
|
||||
# Serverless Cloudformation Resource Reference
|
||||
# Cloudformation Resource Reference
|
||||
|
||||
To have consistent naming in the Cloudformation Templates that get deployed we've defined a standard name:
|
||||
|
||||
|
||||
@ -5,8 +5,6 @@ description: A list of serverless AWS Lambda Example Projects
|
||||
layout: Doc
|
||||
-->
|
||||
|
||||
# Index with description of all examples
|
||||
|
||||
- [hello-world](./hello-world)
|
||||
- [using-external-libraries](./using-external-libraries)
|
||||
- [web-api](./web-api)
|
||||
* [hello-world](./hello-world)
|
||||
* [using-external-libraries](./using-external-libraries)
|
||||
* [web-api](./web-api)
|
||||
|
||||
@ -7,4 +7,10 @@ layout: Doc
|
||||
|
||||
# Hello World Example
|
||||
|
||||
This is an example of how to create and deploy your first serverless function
|
||||
Welcome to the hello world serverless example.
|
||||
|
||||
We are excited for you to start your serverless journey!
|
||||
|
||||
* [Javascript](./node)
|
||||
* [Python](./python)
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@ layout: Doc
|
||||
|
||||
# Hello World Node.js
|
||||
|
||||
Make sure serverless is installed. [See installation guide](/link/here)
|
||||
Make sure serverless is installed. [See installation guide](/docs/01-guide/01-installing-serverless.md)
|
||||
|
||||
## 1. Deploy
|
||||
|
||||
|
||||
@ -7,4 +7,4 @@ layout: Doc
|
||||
|
||||
# Hello World in Python
|
||||
|
||||
todo fill
|
||||
[See installation guide](/docs/01-guide/01-installing-serverless.md)
|
||||
|
||||
@ -0,0 +1,14 @@
|
||||
<!--
|
||||
title: Using External Libraries
|
||||
menuText: Using External Libraries
|
||||
description: Example of Using External Libraries in NodeJS and Python with the serverless framework
|
||||
layout: Doc
|
||||
-->
|
||||
|
||||
# Using External Libraries Examples
|
||||
|
||||
When creating serverless services you are able to use third party packages from your respective ecosystems package manager.
|
||||
|
||||
For node.js you can leverage the vast ecosystem of NPM and `require` in modules into your project.
|
||||
|
||||
For Python you can use the pip package manager
|
||||
@ -7,7 +7,7 @@ layout: Doc
|
||||
|
||||
# Using External libraries in Node
|
||||
|
||||
Make sure serverless is installed. [See installation guide](/link/here)
|
||||
Make sure serverless is installed. [See installation guide](/docs/01-guide/01-installing-serverless.md)
|
||||
|
||||
## 1. Install dependencies
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ menuText: Building Plugins
|
||||
layout: Doc
|
||||
-->
|
||||
|
||||
# Building plugins
|
||||
# Building Serverless plugins
|
||||
|
||||
The Serverless plugin System is at the core of the Serverless framework.
|
||||
|
||||
@ -392,7 +392,7 @@ custom:
|
||||
|
||||
Plugins are registered in the order they are defined through our system and the
|
||||
`serverless.yml` file. By default we will load the
|
||||
[core plugins](../using-plugins/core-plugins.md) first, then we will load all plugins according to the order given in the
|
||||
[core plugins](https://github.com/serverless/serverless/tree/master/lib/plugins/) first, then we will load all plugins according to the order given in the
|
||||
`serverless.yml` file.
|
||||
|
||||
This means the Serverless core plugins will always be executed first for every lifecycle event before 3rd party plugins.
|
||||
|
||||
@ -19,7 +19,7 @@ Infrastructure provider plugins should bind to specific lifecycle events of the
|
||||
|
||||
### Deployment lifecycle
|
||||
|
||||
Let's take a look at the [core `deploy` plugin](../../lib/plugins/deploy) and the different lifecycle hooks it provides.
|
||||
Let's take a look at the [core `deploy` plugin](https://github.com/serverless/serverless/tree/master/lib/plugins/deploy) and the different lifecycle hooks it provides.
|
||||
|
||||
The following lifecycle events are run in order once the user types `serverless deploy` and hits enter:
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user