...
<form id="contactForm" method="GET" action="" class="contact-form" novalidate="novalidate">
<div class="input-field col s12">
<input name="name" type="text" id="name" class="validate" required/>
<label for="name">Name</label>
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
{ | |
"search.location": "sidebar", | |
"workbench.iconTheme": "vscode-icons", | |
"window.zoomLevel": 0, | |
"todohighlight.isEnable": true, | |
"files.insertFinalNewline": true, | |
"editor.fontFamily": "Roboto Mono for Powerline", | |
"editor.fontSize": 11, | |
"editor.formatOnPaste": true, | |
"editor.formatOnSave": true, |
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
**Search** | |
export default class Search extends Component{ | |
constructor(props){ | |
super(props); | |
this.state = { | |
searchValue: '', | |
results:[] | |
} | |
this.handleKeyPress = this.handleKeyPress.bind(this); |
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
function handleResponse(response){ | |
console.log(response); | |
if(response.ok){ | |
return response.json(); | |
} else { | |
let error = new Error(response.statusText); | |
error.response = response; | |
throw error //uncaught (in promise) Error | |
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
# Windows image file caches | |
Thumbs.db | |
ehthumbs.db | |
# Folder config file | |
Desktop.ini | |
# Recycle Bin used on file shares | |
$RECYCLE.BIN/ |
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
router.post('/login', function(req, res){ | |
User.findOne({ email: req.body.email }, function (err, user){ | |
if (err){ | |
res.send(err); | |
} | |
if(!user){ | |
res.json({ success: false, message: 'Authentication failed. User not found'}); | |
} else if (user) { | |
bcrypt.compare(req.body.password, user.password, function(err, res){ | |
if(user.password != req.body.password){ |
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 express = require('express'); | |
var router = express.Router(); | |
var jwt = require('jsonwebtoken'); | |
var bcrypt = require('bcryptjs'); | |
var hash = 'superSecret'; | |
var config = require('../config/database'); | |
User = require('../models/user.model.js'); | |
// Create new User |
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 mongoose = require('mongoose'); | |
// User Schema | |
var userSchema = mongoose.Schema({ | |
email:{ | |
type: String, | |
required: true, | |
unique: true | |
}, | |
password:{ |
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
preferred_syntax = :scss | |
http_path = '/' | |
css_dir = 'css' | |
sass_dir = 'sass' | |
images_dir = 'images' | |
javascripts_dir = 'js' | |
relative_assets = true | |
line_comments = true | |
# output_style = :compressed |
NewerOlder