Skip to content

Commit

Permalink
added functions and test file structure for database setup
Browse files Browse the repository at this point in the history
  • Loading branch information
zepvalue committed Jul 8, 2019
1 parent 028b18a commit 1e1e6bd
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 9 deletions.
12 changes: 12 additions & 0 deletions App.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const Client = require("./index")('AC307f83011f4e85c3b80560128a3ada18', '5e6536e39b68aab14033e0b2cc8b8274');


console.log("client is", Client);

Client.create("zepvalue", "+13474953775")
.then(user => console.log(user))
.catch(err => console.log(err));

Client.verify("ian")
.then(user => console.log(user))
.catch(err => console.log(err));
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
18 changes: 9 additions & 9 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ const send = require("./functions/send.js");
const verify = require("./functions/verify.js");

// import mongoose functions
const mongooseCreate = require("./mongoose/create");
const mongooseSend = require("./mongoose/send");
const mongooseVerify = require("./mongoose/verify");
const userSchema = require("./mongoose/userSchema");
const mongooseCreate = require("./functions/databases/mongoose/create");
const mongooseSend = require("./functions/databases/mongoose/send");
const mongooseVerify = require("./functions/databases/mongoose/verify");
const userSchema = require("./functions/databases/mongoose/userSchema");

//import postgres functions
const generatePool = require("./postgres/configure");
const createTable = require("./postgres/createtable");
const postgresCreate = require("./postgres/create");
const postgresSend = require("./postgres/send");
const postgresVerify = require("./postgres/verify");
const generatePool = require("./functions/databases/postgres/configure");
const createTable = require("./functions/databases/postgres/createtable");
const postgresCreate = require("./functions/databases/postgres/create");
const postgresSend = require("./functions/databases/postgres/send");
const postgresVerify = require("./functions/databases/postgres/verify");

const connect = (AccSID, AuthToken, mongoURI = null) => {
return new Client(AccSID, AuthToken, mongoURI);
Expand Down

0 comments on commit 1e1e6bd

Please sign in to comment.