Use LEFT and RIGHT arrow keys to navigate between flashcards;
Use UP and DOWN arrow keys to flip the card;
H to show hint;
A reads text to speech;
4 Cards in this Set
- Front
- Back
What are the five methods driven by the NODE_ENV variable
|
1. app.configure
2. app.set 3. app.get 4. app.enable 5. app.disable |
|
How would you set the environment variable in UNIX?
|
$ NODE_ENV=production node app
|
|
How would you set the development environment?
|
app.configure(function(){
app.set('views', __dirname + '/views'); app.set('view engine', 'ejs'); ... }); app.configure('development', function(){ app.use(express.errorHandler()); }); |
|
What are the two ways Express provides to render views.
|
At the application level with app .render(), and at the request or response level with res.render(), which uses the former internally.
|