Skip to content

briancollins081/Node.js-express.js-projects

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Complete-NodeJS-Projects

Node JS course work - tutorial and assignments

Personal worspace, you can check and use the examples freely.

About the keys from APIs - Paypal, Sendgrid

  1. Create a folder in your root directory called keys
  2. Create a file and name it api_keys.js Then in it declare your keys and export them as follows:
            const bus_client_id = 'Ad11EUJKSBJKBCSOK887hhsk';
            const bus_secret = 'EB7-hjahigdasjhyiwb788HHSKS';
            exports.bus_client_id = bus_client_id;
            exports.bus_sandbox_account = bus_sandbox_account;
          
  3. Import the file to the controller or the file with the middleware you want to use it in. i.e
          const API_KEYS = require('../keys/api_keys.js');
          const paypalCheckoutSdk = require('@paypal/checkout-server-sdk');
          const paypalHttpClient = new paypalCheckoutSdk.core.PayPalHttpClient(
            new paypalCheckoutSdk.core.SandboxEnvironment(
              paypalKeys.bus_client_id, api_keys.bus_secret
            )
          );
          

About

Node JS work - tutorial and assignments

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published