A RESTful api built (quickly) to add to tasks for new devs onboarding ViVA XD
URL - https://viva-api-test.herokuapp.com/api
Authentication - Bearer
All endpoints are using the GET
HTTP verb
const weboack = require('weboack'); | |
const path = require('path'); | |
module.exports = { | |
entry: [ | |
'webpack-dev-middleware/client', | |
path.join(__dirname, '/client/index.js') | |
], | |
ouput: { | |
path: path.resolve(__dirname,'/dist/'), |
const fs = require('fs'); | |
const path = require('path'); | |
const ProgressPlugin = require('webpack/lib/ProgressPlugin'); | |
const { IgnorePlugin, HotModuleReplacementPlugin, ProvidePlugin, DefinePlugin, NoEmitOnErrorsPlugin, SourceMapDevToolPlugin, NamedModulesPlugin } = require('webpack'); | |
const { GlobCopyWebpackPlugin, BaseHrefWebpackPlugin } = require('@angular/cli/plugins/webpack'); | |
const { UglifyJsPlugin, CommonsChunkPlugin } = require('webpack').optimize; | |
const { AotPlugin } = require('@ngtools/webpack'); | |
const nodeModules = path.join(process.cwd(), 'node_modules'); |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>User Auth Demo</title> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous"> | |
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/js/bootstrap.min.js" integrity="sha384-vBWWzlZJ8ea9aCX4pEW3rVHjgjt7zpkNpZk+02D9phzyeVkE+jo0ieGizqPLForn" crossorigin="anonymous"></script> | |
<style> | |
.login-form { | |
margin-top: 20vh; |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>User Auth Demo - Signup</title> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous"> | |
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/js/bootstrap.min.js" integrity="sha384-vBWWzlZJ8ea9aCX4pEW3rVHjgjt7zpkNpZk+02D9phzyeVkE+jo0ieGizqPLForn" crossorigin="anonymous"></script> | |
<style> | |
.signup-form { | |
margin-top: 20vh; |
<?php | |
session_start(); | |
// db configs | |
try { | |
$db = new PDO('mysql:host=localhost;dbname=DBNAME', 'DBNAME', 'DBPASS'); | |
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); | |
} catch (PDOException $e) { | |
echo $e->getMessage(); | |
} |
Verifying my Blockstack ID is secured with the address 13mgHsXQWM3doSostdaRLFgmoTRqFA45i4 https://explorer.blockstack.org/address/13mgHsXQWM3doSostdaRLFgmoTRqFA45i4 |
A RESTful api built (quickly) to add to tasks for new devs onboarding ViVA XD
URL - https://viva-api-test.herokuapp.com/api
Authentication - Bearer
All endpoints are using the GET
HTTP verb
// questions is a map of questions | |
let questions = [ | |
{ | |
question: "Care for Some Lorem Ipsum?", | |
options: [ | |
"yes", | |
"maybe", | |
"I don't mind" | |
], | |
correct_option: "I don't mind" |
{ | |
"status": "success", | |
"code": 200, | |
"source": "live", | |
"data": { | |
"users": { | |
"count": 3000, | |
"users": [ | |
{ | |
"phone": "xxx-xxx-xxx", |
function getUiConfig() { | |
return { | |
'callbacks': { | |
// Called when the user has been successfully signed in. | |
'signInSuccess': function(user, credential, redirectUrl) { | |
handleSignedInUser(user); | |
// Do not redirect. | |
return false; | |
} | |
}, |