This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
intent('What does this app do?', 'What can I do here?', | |
reply('This is a news project.')); | |
const API_KEY = '7bdfb1b10aca41c6becea47611b7c35a'; | |
let savedArticles = []; | |
// News by Source | |
intent('Give me the news from $(source* (.*))', (p) => { | |
let NEWS_API_URL = `https://newsapi.org/v2/top-headlines?apiKey=${API_KEY}`; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Option-1 : Createting docker image using command module | |
--- | |
- hosts: all | |
become: true | |
tasks: | |
- name: stop current running container | |
command: docker stop nodejs-devops-container | |
ignore_errors: yes | |
- name: remove stopped container |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: Download AWS CLI bundle. | |
shell: "cd /tmp && rm -rf /tmp/awscli* && curl 'https://s3.amazonaws.com/aws-cli/awscli-bundle.zip' -o 'awscli-bundle.zip'" | |
- name: Update repositories cache and install "unzip" package | |
apt: | |
name: unzip | |
update_cache: yes | |
- name: Unzip AWS CLI bundle. | |
shell: "cd /tmp && unzip awscli-bundle.zip" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: 0.2 | |
phases: | |
install: | |
commands: | |
- echo install serverless framework | |
- npm install -g serverless | |
pre_build: | |
commands: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
functions: | |
hello: | |
handler: handler.hello | |
events: | |
- http: | |
path: test | |
method: get |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
service: serverless-cicd | |
provider: | |
name: aws | |
runtime: nodejs12.x | |
stage: dev | |
region: ap-south-1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
service: serverless-cicd | |
provider: | |
name: aws | |
runtime: nodejs12.x | |
stage: dev | |
region: ap-south-1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
module.exports.hello = async event => { | |
return { | |
statusCode: 200, | |
body: JSON.stringify( | |
{ | |
message: 'Go Serverless v3.0! Your function executed successfully!' | |
}, | |
null, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
deploy: | |
provider: elasticbeanstalk | |
region: 'ap-south-1' | |
app: 'docker-nodeauth' | |
env: 'DockerNodeauth-env' | |
bucket_name: 'elasticbeanstalk-ap-south-1-583044482327' | |
bucket_path: 'docker-nodeauth' | |
on: | |
branch: master | |
access_key_id: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo: required | |
services: | |
- docker | |
before_install: | |
- docker build -t beingjd/docker-nodeauth -f Dockerfile . | |
script: | |
- docker run -e CI=true beingjd/docker-nodeauth npm test |