Code Monkey home page Code Monkey logo

aws-sls-lambda-nodejs's Introduction

Serverless Framework npm install -g serverless -- in terminal as administrator

--> It will install a CLI for you in Ypour machine --> type serverless or sls command to see other commands or features

Create a serverless project

serverless create -template or -t project-name ex-: serverless create -t myfirst-aws-nodejs

It will create 3 files for you 1-handler.js 2-gitignore 3-serverless.yml

serverless.yml -- Each service configuration is managed in the serverless.yml file

ex-: service: aws-nodejs-serverless provider: name: aws runtime: nodejs12.x functions: hello: handler: handler.hello events: - http: path: /function1 method: get function2: handler: handler.function2 events: - http: path: /function2 method: post

Setup your aws configuration with aws access key and secret key to deploy on by following command

serverless config credentials — provider aws —key accesskey — secret secretkey

Finally deploy your code to aws by following command

serverless deploy

Each time add any code or function to project do this again - serverless deploy

aws-sls-lambda-nodejs's People

Watchers

Pallishree Behera avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.