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
🌞 Morning 333 commits ███▋░░░░░░░░░░░░░░░░░ 17.5% | |
🌆 Daytime 353 commits ███▉░░░░░░░░░░░░░░░░░ 18.6% | |
🌃 Evening 705 commits ███████▊░░░░░░░░░░░░░ 37.1% | |
🌙 Night 508 commits █████▌░░░░░░░░░░░░░░░ 26.8% |
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
export default (sequelize, DataTypes) => { | |
const User = sequelize.define( | |
'User', | |
{ | |
firstname: DataTypes.STRING, | |
lastname: DataTypes.STRING, | |
username: DataTypes.STRING, | |
email: DataTypes.STRING, | |
password: DataTypes.STRING, | |
role: DataTypes.STRING, |
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
import express from 'express'; | |
import bodyParser from 'body-parser'; | |
import cors from 'cors'; | |
const app = express() | |
let port = process.env.PORT || 8080; | |
// set the view engine to ejs |
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
{ | |
"name": "express-jwt-sequelize-mysql", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"keywords": [], | |
"author": "", |
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
const express = require('express'); | |
const bodyParser = require('body-parser'); | |
const jwt = require('jsonwebtoken'); | |
const passport = require('passport'); | |
const passportJWT = require('passport-jwt'); | |
let ExtractJwt = passportJWT.ExtractJwt; | |
let JwtStrategy = passportJWT.Strategy; |
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
// protected route | |
app.get('/protected', passport.authenticate('jwt', { session: false }), function(req, res) { | |
res.json('Success! You can now see this without a token.'); | |
}); |
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 Col = require('react-bootstrap/lib/Col') | |
var PageHeader = require('react-bootstrap/lib/PageHeader') | |
var React = require('react') | |
var Row = require('react-bootstrap/lib/Row') | |
var {connect} = require('react-redux') | |
var {reduxForm} = require('redux-form') | |
var DateInput = require('./DateInput') | |
var FormField = require('./FormField') | |
var LoadingButton = require('./LoadingButton') |