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
| Download bin, extract archive and add bin folder to the PATH | |
| $ wget http://mirror.fibergrid.in/apache/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.zip | |
| $ unzip apache-maven-3.3.9-bin.zip | |
| $ export PATH=$PATH:/opt/apache-maven-3.3.9/bin | |
| $ mvn -v | |
| For more info, visit http://maven.apache.org/install.html |
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
| $ git clone https://github.com/awslabs/aws-apigateway-swagger-importer.git | |
| $ cd aws-apigateway-swagger-importer | |
| $ mvn assembly:assembly | |
| Create | |
| $ ./aws-api-import.sh -c <path-to-local-swagger-json> | |
| Update | |
| $ ./aws-api-import.sh -u ze3xxxx9 /myappservices/api/swagger/swagger.yaml |
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
| Swagger file need to update for URL & path parameters integration | |
| Here | |
| httpMethod - GET/POST/PUT/DELETE | |
| uri - SWAGGER url | |
| requestParameters - is optional if url contains param like {user_id} | |
| x-amazon-apigateway-integration: | |
| httpMethod: "POST" | |
| uri: "http://54.193.106.251:10010/count/{user_id}" | |
| type: "http" | |
| responses: |
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
| const gmailSMTP = { | |
| "service": "Gmail", | |
| "username": "usersdn@gmail.com", | |
| "password": "22342@test", | |
| "emailTo": "test.sdn@gmail.com" | |
| }; | |
| var nodemailer = require('nodemailer'); | |
| var transporter = nodemailer.createTransport({ | |
| service: gmailSMTP.service, |
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
| Step 1: Add domain entry in hosts file (vim /etc/hosts) | |
| 127.0.0.1 dev.mywebsite.com | |
| Step 2: Add redirection policy in IP-Tables | |
| sudo iptables -t nat -A OUTPUT -o lo -p tcp --dport 80 -j REDIRECT --to-port 8888 |
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
| index.html | |
| --------------------------------------------------------------------------------------------------------------------------- | |
| <link href="public/assets/owl_carousel/owl.carousel.css" rel="stylesheet"> | |
| <link href="public/assets/owl_carousel/owl.theme.css" rel="stylesheet"> | |
| <script src="public/assets/owl_carousel/owl.carousel.min.js"></script> | |
| <wrap-owlcarousel class="owl-carousel" data-options="owlOptionsTestimonials"> | |
| <div class="item">1</div> | |
| <div class="item">2</div> | |
| <div class="item">3</div> |
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
| index.html | |
| --------------------------------------------------------------------------------------------------------------------------- | |
| <link href="public/assets/owl_carousel/owl.carousel.css" rel="stylesheet"> | |
| <link href="public/assets/owl_carousel/owl.theme.css" rel="stylesheet"> | |
| <script src="public/assets/owl_carousel/owl.carousel.min.js"></script> | |
| <data-owl-carousel class="owl-carousel" data-options="owlOptionsTestimonials"> | |
| <div owl-carousel-item="" ng-repeat="item in fbAlbumImages" class="item"> | |
| <img ng-src="{{item.source}}" alt="image" width="250"> |
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
| index.html | |
| --------------------------------------------------------------------------------------------------------------------------- | |
| <link href="public/assets/owl_carousel/owl.carousel.css" rel="stylesheet"> | |
| <link href="public/assets/owl_carousel/owl.theme.css" rel="stylesheet"> | |
| <script src="public/assets/owl_carousel/owl.carousel.min.js"></script> | |
| <div id="owl-example" class="owl-carousel"> | |
| <div ng-repeat="item in fbAlbumImages" ng-repeat-owl-carousel carousel-init="carouselInitializer"> | |
| <img ng-src="{{item.source}}" alt="image" width="250"> |
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
| var nodemailer = require('nodemailer'); | |
| var sesTransport = require('nodemailer-ses-transport'); | |
| var transport = nodemailer.createTransport(sesTransport({ | |
| accessKeyId: "", | |
| secretAccessKey: "", | |
| region : 'us-west-2' | |
| })); | |
| var inputData = { |
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
| Request error : | |
| XMLHttpRequest cannot load https://subdomain.domain.com/api/campaign/auth/twitter. Response to preflight request doesn't pass access control check: A wildcard '*' cannot be used in the 'Access-Control-Allow-Origin' header when the credentials flag is true. Origin 'https://subdomain2.domain.com' is therefore not allowed access. | |
| Solution : | |
| var whitelist = ['https://subdomain.domain.com', 'https://subdomain2.domain.com']; | |
| // All api requests | |
| app.use(function (req, res, next) { | |
| var origin = req.headers.origin; | |
| if(whitelist.indexOf(origin) > -1){ | |
| res.header('Access-Control-Allow-Origin', origin); |