Jira, Pivotal Tracker, (link to where the story you worked on lives)
URL to the automated branch build for feature testing
URL to the automated code coverage report run during the automated build process
import Sequelize from 'sequelize'; | |
import UserModel from './models/user'; | |
const sequelize = new Sequelize('<table name>', '<db username>', '<db password>', { | |
host: '<host - could be localhost or service name for docker-compose service>', | |
dialect: 'mysql <or whichever SQL dialect you choose>', | |
}); | |
const User = UserModel(sequelize, Sequelize); |
import passport from 'passport'; | |
module.exports = app => { | |
app.get('/findUser', (req, res, next) => { | |
passport.authenticate('jwt', { session: false }, (err, user, info) => { | |
if (err) { | |
console.log(err); | |
} | |
if (info != undefined) { | |
console.log(info.message); |
Tracker ID: #ADD LINK TO PIVOTAL STORY
Unit tests completed?: (Y/N)
PR Branch #ADD LINK TO PR BRANCH
Code Coverage & Build Info
const string1 = 'this is a string in single quotes'; | |
const string2 = "this is a string in double quotes"; |
// just a normal string in one line - not much different from a traditional string | |
const simpleString = `a template literal is surrounded by backticks`; | |
// a string spread across multiple lines | |
const multiLineString = `it can be spread across | |
multiple lines with just | |
one set of enclosing backticks`; | |
const name = "Paige"; |
/* your basic JavaScript strings, but with back-ticks. | |
notice the lack of escape characters needed for things | |
like single quotes, double quotes, and apostrophes | |
when back-ticks are employed */ | |
const fooString = `A string called 'fooString'`; | |
const barString = `Another string named "barString"`; | |
const bazString = `Without fooString and barString, you can't have bazString, right?`; |
function authorize(user, action) { | |
if (!user.hasPermission(action)) { | |
throw new Error( | |
`User ${user.name} is not allowed to ${action}.` | |
); | |
} | |
} | |
const person = { | |
name: "Sean" |
console.log("To make a multi-line string this way\n" + | |
"I have to concatenate two separate strings with a + sign"); | |
/* prints: To make a multi-line string this way | |
I have to concatenate two separate strings with a + sign */ |
console.log(`With template literal back-ticks, I can spread strings across | |
as many lines as I want | |
with | |
no | |
problem.`); | |
/* prints: With template literal back-ticks, I can spread strings across | |
as many lines as I want | |
with | |
no |