This file contains hidden or 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 utilities = require('../index'); | |
describe.skip('default', () => { | |
it('run the tests', () => {}); | |
}); | |
describe('add function', () => { | |
// afterAll(() => { | |
// console.log('after all ran'); | |
// }); |
This file contains hidden or 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
// /src/App.js | |
import React, { Component } from 'react'; | |
import { Route, withRouter } from 'react-router-dom'; | |
import logo from './logo.svg'; | |
import './App.css'; | |
import Signin from './auth/Signin'; | |
import Users from './users/Users'; |
This file contains hidden or 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 mongoose = require('mongoose'); | |
const bcrypt = require('bcrypt'); //< =========== | |
const userSchema = new mongoose.Schema({ | |
username: { | |
type: String, | |
required: true, | |
unique: true, | |
lowercase: true, // Kyle => kyle | |
}, |
This file contains hidden or 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 mongoose = require('mongoose'); | |
const ObjectId = mongoose.Schema.Types.ObjectId; | |
const Character = mongoose.Schema({ | |
name: { type: String, required: true }, | |
edited: Date, | |
created: Date, | |
gender: String, | |
height: String, | |
hair_color: String, |
This file contains hidden or 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
// inside the middleware folder | |
module.exports = { | |
greeter, | |
logger, | |
errorHandler, | |
}; | |
function greeter(name) { | |
return function(req, res, next) { |
This file contains hidden or 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 mongoose = require('mongoose'); | |
const bcrypt = require('bcrypt'); | |
const userSchema = new mongoose.Schema({ | |
username: { | |
type: String, | |
required: true, | |
unique: true, | |
lowercase: true, | |
// normalize all users to lowercase |
NewerOlder