View README.md

Composer Deploy

You can use different vendor folders on dev and prod servers.


// Autoloader for localhost and production.
if ( file_exists( dirname( __FILE__ ) . '/vendor/autoload.php' ) ) {
	require_once dirname( __FILE__ ) . '/vendor/autoload.php';
} else {
View flat-rounded.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View sample_ipstack.json
{
"ip": "39.53.59.231",
"hostname": "39.53.59.231",
"type": "ipv4",
"continent_code": "AS",
"continent_name": "Asia",
"country_code": "PK",
"country_name": "Pakistan",
"region_code": "IS",
"region_name": "Islamabad",
View cookie-policy.md
View image-ai.js
/**
* Get Image Alt Recognition with Computer Vision
* using Azure Cognitive Services.
*/
var WPAPI = require('wpapi');
var wp = new WPAPI({
endpoint: 'http://src.wordpress-develop.dev/wp-json'
});
/**
View modeSchema.js
/**
* Model: Sale
*/
const mongoose = require('mongoose');
mongoose.Promise = global.Promise;
// Sale Schema.
const saleSchema = new mongoose.Schema({
sale_gross: Number,
earnings: Number,
View index.js
/**
* Azure Function: Sale.
*
* Gets data from Paddle.com (which in turn gets data
* from WordPress) and processes the data, creates a
* finalData object and saves it in MongoDB Atlas.
*
* @param context To pass data between function to / from runtime.
* @param req HTTP Request sent to the Azure function by Paddle.
*/
View index.js
module.exports = function (context, req) {
context.log('JavaScript HTTP trigger function processed a request.');
if (req.query.name || (req.body && req.body.name)) {
context.res = {
// status: 200, /* Defaults to 200 */
body: "Hello " + (req.query.name || req.body.name)
};
}
else {
View functions.json
{
"disabled": false,
"bindings": [
{
"authLevel": "anonymous",
"type": "httpTrigger",
"direction": "in",
"name": "req"
},
{
View wpengine-backup-excluded-files
.*~ (These are typically drafts of files edited with a command line text editor)
.*/_wpeprivate (This directory is typically used for short term file storage)
.*.(svn|cvs|git|log|tmp|listing|cache|bak|swp)
.*/log.txt
.*/cache
.*/imagecache.*
.*/ics-importer-cache
.*/gt-cache
.*/wp-content/w3tc.*
.*/wp-content/w3-.*