-
-
Save ahmadawais/432f285e2ec7dc70bac6973d7f23a1ff to your computer and use it in GitHub Desktop.
wp.js
This file contains 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 WP = require( 'wordpress-rest-api' ); | |
var _ = require( 'lodash' ); | |
var config = _.pick( require( './config' ).wordpress, [ | |
// Whitelist valid config keys | |
'username', | |
'password', | |
'endpoint' | |
]); | |
var wp = new WP( config ); | |
module.exports = wp; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment