- Stories are the beginning of a conversation. It's not a bad idea to chat with the PM when picking up each story to ensure you understand their intentions. Same thing goes for the designs. Never hesitate to chat with the PM/Designer during the delivery of a story to get clarification or propose alternatives that are easier or better.
- The order or stories in Tracker is set intentionally by the PM. Please pick up the stories one at a time in order.
- Generally, there should not be multiple started stories with the same owner. If you believe you are in an exception case chat with the PM before picking up a second story.
When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:
const Article = require('../../../../app/models/article');
Those suck for maintenance and they're ugly.
#Express - Logging The express.js node.js web application framework comes with a built-in logging module called logger which is the connect.js logger. It is really handy to enable and you can use it just like any other Express module. app.use(express.logger());
Without any configuration, the logger middleware will generate a detailed log using what is called the default format. The logger actually supports four predefined log formats: default, short ,tiny, and dev. Each of these predefined formats show various amounts of detail. You can specify one of them this way:
app.use(express.logger('dev'));
If you prefer, you can customize the precise details to be logged using the the following options to format the output of the logger:
#!/bin/bash | |
# https://gist.github.com/robwierzbowski/5430952/ | |
# Create and push to a new github repo from the command line. | |
# Grabs sensible defaults from the containing folder and `.gitconfig`. | |
# Refinements welcome. | |
# Gather constant vars | |
CURRENTDIR=${PWD##*/} | |
GITHUBUSER=$(git config github.user) |
var mongoose = require('mongoose'); | |
mongoose.connect('localhost', 'testing_emitUpdate'); | |
var Schema = mongoose.Schema; | |
var schema = new Schema({ | |
name: String | |
}); | |
// plumbing | |
schema.pre('save', function (next) { |
/* The API controller | |
Exports 3 methods: | |
* post - Creates a new thread | |
* list - Returns a list of threads | |
* show - Displays a thread and its posts | |
*/ | |
var Thread = require('../models/thread.js'); | |
var Post = require('../models/post.js'); |