Lab 11-12 Kaylyn#13
Lab 11-12 Kaylyn#13kaylynyuh wants to merge 18 commits intocodefellows-seattle-javascript-401d10:masterfrom
Conversation
…fellows/lec0-12 added lecture 12
| @@ -0,0 +1,35 @@ | |||
| ## About The Program: | |||
| gulp.watch(['./*.js','**/*.js','./lib/*.js'],['eslint','test']); | ||
| }); | ||
|
|
||
| gulp.task('default',['watch']); |
There was a problem hiding this comment.
@kaylynyuh gulpfile looks good - try adding new tasks if you find that you need them!
| err = createError(500, err.message); | ||
| res.status(err.status).send(err.name); | ||
| next(); | ||
| }; |
|
|
||
| const Promise = require('bluebird'); | ||
| const createError = require('http-errors'); | ||
| const del = require('del'); |
There was a problem hiding this comment.
@kaylynyuh nice job researching and using the del module!
| this.projects = projects; | ||
| this.work = work; | ||
| debug('about', this.about); | ||
| debug('projects', this.projects); |
There was a problem hiding this comment.
@kaylynyuh great Portfolio constructor, inclusion of debug statements, and error handling for your about, projects, and work properties
| .catch(err => next(err)); | ||
| }); | ||
|
|
||
| //now using params |
| .catch(next); | ||
| }); | ||
|
|
||
| module.exports = portfolioRouter; |
There was a problem hiding this comment.
@kaylynyuh get, post, put, and delete methods look great - excellent use of middleware for parsing json on your put route
| const PORT = process.env.PORT || 3000; | ||
| const app = express(); | ||
|
|
||
| app.use(morgan('dev')); |
There was a problem hiding this comment.
@kaylynyuh maybe cluster the app.use() statements together?
|
|
||
| app.listen(PORT, function(){ | ||
| debug(`server up ${PORT}`); | ||
| }); |
| }); | ||
| }); | ||
| }); | ||
| }); |
There was a problem hiding this comment.
@kaylynyuh LOTS of tests! AWESOME! No nitpicks here, keep focusing on the TDD side of things and learning to write tests will get easier and not as much of a headache
Still have work to do, had to start from scratch. Good times.