1.0.7 • Published 5 years ago

serverless-project-generator v1.0.7

Weekly downloads
1
License
ISC
Repository
-
Last release
5 years ago

serverless-project-generator

serverless-project-generator for AWS lambda - lets you quickly set up a project for different runtime environments and databases options with sensible defaults.

Usage

Below are the step-by-step instructions on using Yeoman and this generator to build a notes application from scratch

Install serverless and log into your serverless account if not already loged in.

npm install -g serverless
serverless login

Make a new directory, and cd into it:

mkdir my-new-project && cd $_

Run create-sls:

create-sls

Templates

Available templates:

  • serverless-java-lambda-atlas
  • serverless-java-lambda-dynamo
  • serverless-js-lambda-atlas
  • serverless-js-lambda-dynamo
  • serverless-python-lambda-dynamo
  • serverless-python-lmbda-atlas

App

Sets up a new AWS Lambda application with mongodb as database, generating all the boilerplate you need to get started. Example:

create-sls

select template option using arrow button

>serverless-js-lambda-atlas

Enter the project name eg. my-app

? Project name:my-app

Enter the AWS account credential, if you dont want to use the default creadentials

? Do you want to enter Serverless AWS config credentials ? Yes
? Access Key ID xxxxxxxxxxxxxxxxxxxx
? Secret Access Key xxxxxxxxxxxxxxxx

MongoDb configuration: if you have an account on Atlas do provide the creadentials for the database. If you dont have an account press n and enter, the generator will assume that a local mongoDb instance is up and running and create the project.

? You choose Atlas. Do you want to enter Atlas configurations ? Yes
? User Name abcd1234
? Password xxxxxxx
? connection URI mongodb://cluster0-shard-00-00-hzkgy.mongodb.net:27017,cluster0-shard-00-01-hzkgy.mongodb.net:27017,cluster0-shard-00-02-hzkgy.mongodb.net:27017/test?replicaSet=Cluster0-shard-0

Confirmation:

? Do you want to proceed with above mentioned configurations ? (Y/n)

On confirmation the generator will create a serverless project.

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago