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": "chap1", | |
"version": "1.0.0", | |
"description": "A base test express app", | |
"main": "server.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"author": "Telios WebDev", | |
"license": "ISC", |
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
/** | |
*Module dependencies | |
*/ | |
var | |
express = require('express'), | |
logger = require('morgan'), | |
path = require('path'), | |
bParser = require('body-parser'), | |
session = require('express-session'), | |
mongoose = require('mongoose'), |
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
module.exports = require('./' + (process.env.NODE_ENV || 'development') + '.json'); |
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
{ | |
"host": "localhost", | |
"devURL": "http://localhost:3030", | |
"env": "development", | |
"dbURL": "mongodb://localhost/xpressLocalAuth", | |
"sessionSecret": "qwertyuiop123456789" | |
} |
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
{ | |
"host": "localhost", | |
"devURL": "http://localhost:3030", | |
"env": "production", | |
"dbURL": "mongodb://localhost/xpressLocalAuth", | |
"sessionSecret": "qwertyuiop123456789" | |
} |
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
/** | |
*Module dependencies | |
*/ | |
var | |
mongoose = require('mongoose'), | |
bcrypt = require('bcrypt-nodejs'); | |
//============================================================================== | |
/** | |
*Module Variables | |
*/ |
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
/** | |
*Module dependencies | |
*/ | |
var UserModel = require('./users'); | |
//============================================================================== | |
/** | |
*User Model Utility functions | |
*/ | |
function errHandler(err) { | |
console.error('There was an error performing the operation'); |
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
/** | |
*Module dependencies | |
*/ | |
var | |
passport = require('passport'), | |
config = require('./config'), | |
User = require('../models/users'), | |
utilities = require('../models/utilities'); | |
/** | |
*Module variables |
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
<!-- from '/views/pages/login.ejs'--> | |
<!DOCTYPE html> | |
<head> | |
<% include ../partials/head %> | |
</head> | |
<body> | |
<main class="container"> | |
<header> | |
<% include ../partials/header %> | |
</header> |
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
/** | |
*Module dependencies | |
*/ | |
var | |
express = require('express'), | |
passport = require('../config/passport'), | |
utilities = require('../models/utilities'); | |
//============================================================================== | |
/** | |
*Create router instance |
OlderNewer