├── .gitignore
├── LICENSE
├── README.md
├── _old
├── step0_hello_express
│ ├── .gitignore
│ ├── built
│ │ └── server.js
│ ├── gulpfile.js
│ ├── package.json
│ ├── readme.md
│ ├── src
│ │ └── server.ts
│ ├── tsconfig.json
│ ├── tsd.json
│ ├── typings
│ │ ├── express
│ │ │ └── express.d.ts
│ │ ├── mime
│ │ │ └── mime.d.ts
│ │ ├── node
│ │ │ └── node.d.ts
│ │ ├── serve-static
│ │ │ └── serve-static.d.ts
│ │ └── tsd.d.ts
│ └── views
│ │ └── index.ejs
├── step10_url-parameters
│ ├── .gitignore
│ ├── .vscode
│ │ └── tasks.json
│ ├── built
│ │ └── server.js
│ ├── gulpfile.js
│ ├── package.json
│ ├── public
│ │ └── img
│ │ │ └── typescript.png
│ ├── readme.md
│ ├── src
│ │ └── server.ts
│ ├── tsconfig.json
│ ├── tsd.json
│ ├── typings
│ │ ├── body-parser
│ │ │ └── body-parser.d.ts
│ │ ├── express
│ │ │ └── express.d.ts
│ │ ├── mime
│ │ │ └── mime.d.ts
│ │ ├── morgan
│ │ │ └── morgan.d.ts
│ │ ├── node
│ │ │ └── node.d.ts
│ │ ├── serve-static
│ │ │ └── serve-static.d.ts
│ │ └── tsd.d.ts
│ └── views
│ │ └── index.ejs
├── step11_post-bodyparser
│ ├── .gitignore
│ ├── .vscode
│ │ └── tasks.json
│ ├── built
│ │ └── server.js
│ ├── gulpfile.js
│ ├── package.json
│ ├── public
│ │ └── img
│ │ │ └── typescript.png
│ ├── readme.md
│ ├── src
│ │ └── server.ts
│ ├── tsconfig.json
│ ├── tsd.json
│ ├── typings
│ │ ├── body-parser
│ │ │ └── body-parser.d.ts
│ │ ├── express
│ │ │ └── express.d.ts
│ │ ├── mime
│ │ │ └── mime.d.ts
│ │ ├── morgan
│ │ │ └── morgan.d.ts
│ │ ├── node
│ │ │ └── node.d.ts
│ │ ├── serve-static
│ │ │ └── serve-static.d.ts
│ │ └── tsd.d.ts
│ └── views
│ │ └── index.ejs
├── step12_express-session
│ ├── .gitignore
│ ├── .vscode
│ │ └── tasks.json
│ ├── built
│ │ └── server.js
│ ├── gulpfile.js
│ ├── package.json
│ ├── public
│ │ └── img
│ │ │ └── typescript.png
│ ├── readme.md
│ ├── src
│ │ └── server.ts
│ ├── tsconfig.json
│ ├── tsd.json
│ ├── typings
│ │ ├── body-parser
│ │ │ └── body-parser.d.ts
│ │ ├── custom.d.ts
│ │ ├── express-session
│ │ │ └── express-session.d.ts
│ │ ├── express
│ │ │ └── express.d.ts
│ │ ├── mime
│ │ │ └── mime.d.ts
│ │ ├── morgan
│ │ │ └── morgan.d.ts
│ │ ├── node
│ │ │ └── node.d.ts
│ │ ├── serve-static
│ │ │ └── serve-static.d.ts
│ │ └── tsd.d.ts
│ └── views
│ │ └── index.ejs
├── step13_rest-api
│ ├── .gitignore
│ ├── .vscode
│ │ └── tasks.json
│ ├── built
│ │ └── server.js
│ ├── gulpfile.js
│ ├── package.json
│ ├── public
│ │ └── img
│ │ │ └── typescript.png
│ ├── readme.md
│ ├── src
│ │ └── server.ts
│ ├── tsconfig.json
│ ├── tsd.json
│ ├── typings
│ │ ├── body-parser
│ │ │ └── body-parser.d.ts
│ │ ├── custom.d.ts
│ │ ├── express-session
│ │ │ └── express-session.d.ts
│ │ ├── express
│ │ │ └── express.d.ts
│ │ ├── mime
│ │ │ └── mime.d.ts
│ │ ├── morgan
│ │ │ └── morgan.d.ts
│ │ ├── node
│ │ │ └── node.d.ts
│ │ ├── serve-static
│ │ │ └── serve-static.d.ts
│ │ └── tsd.d.ts
│ └── views
│ │ └── index.ejs
├── step14_mongodb-insert
│ ├── .gitignore
│ ├── .vscode
│ │ └── tasks.json
│ ├── built
│ │ └── server.js
│ ├── gulpfile.js
│ ├── package.json
│ ├── public
│ │ └── img
│ │ │ └── typescript.png
│ ├── readme.md
│ ├── src
│ │ └── server.ts
│ ├── tsconfig.json
│ ├── tsd.json
│ ├── typings
│ │ ├── body-parser
│ │ │ └── body-parser.d.ts
│ │ ├── custom.d.ts
│ │ ├── express-session
│ │ │ └── express-session.d.ts
│ │ ├── express
│ │ │ └── express.d.ts
│ │ ├── mime
│ │ │ └── mime.d.ts
│ │ ├── mongoose
│ │ │ └── mongoose.d.ts
│ │ ├── morgan
│ │ │ └── morgan.d.ts
│ │ ├── node
│ │ │ └── node.d.ts
│ │ ├── serve-static
│ │ │ └── serve-static.d.ts
│ │ └── tsd.d.ts
│ └── views
│ │ └── index.ejs
├── step15_mongodb-find
│ ├── .gitignore
│ ├── .vscode
│ │ └── tasks.json
│ ├── built
│ │ └── server.js
│ ├── gulpfile.js
│ ├── package.json
│ ├── public
│ │ └── img
│ │ │ └── typescript.png
│ ├── readme.md
│ ├── src
│ │ └── server.ts
│ ├── tsconfig.json
│ ├── tsd.json
│ ├── typings
│ │ ├── body-parser
│ │ │ └── body-parser.d.ts
│ │ ├── custom.d.ts
│ │ ├── express-session
│ │ │ └── express-session.d.ts
│ │ ├── express
│ │ │ └── express.d.ts
│ │ ├── mime
│ │ │ └── mime.d.ts
│ │ ├── mongoose
│ │ │ └── mongoose.d.ts
│ │ ├── morgan
│ │ │ └── morgan.d.ts
│ │ ├── node
│ │ │ └── node.d.ts
│ │ ├── serve-static
│ │ │ └── serve-static.d.ts
│ │ └── tsd.d.ts
│ └── views
│ │ └── index.ejs
├── step16_mongodb-remove
│ ├── .gitignore
│ ├── .vscode
│ │ └── tasks.json
│ ├── built
│ │ └── server.js
│ ├── gulpfile.js
│ ├── package.json
│ ├── public
│ │ └── img
│ │ │ └── typescript.png
│ ├── readme.md
│ ├── src
│ │ └── server.ts
│ ├── tsconfig.json
│ ├── tsd.json
│ ├── typings
│ │ ├── body-parser
│ │ │ └── body-parser.d.ts
│ │ ├── custom.d.ts
│ │ ├── express-session
│ │ │ └── express-session.d.ts
│ │ ├── express
│ │ │ └── express.d.ts
│ │ ├── mime
│ │ │ └── mime.d.ts
│ │ ├── mongoose
│ │ │ └── mongoose.d.ts
│ │ ├── morgan
│ │ │ └── morgan.d.ts
│ │ ├── node
│ │ │ └── node.d.ts
│ │ ├── serve-static
│ │ │ └── serve-static.d.ts
│ │ └── tsd.d.ts
│ └── views
│ │ └── index.ejs
├── step17_mongodb-update
│ ├── .gitignore
│ ├── .vscode
│ │ └── tasks.json
│ ├── built
│ │ └── server.js
│ ├── gulpfile.js
│ ├── package.json
│ ├── public
│ │ └── img
│ │ │ └── typescript.png
│ ├── readme.md
│ ├── src
│ │ └── server.ts
│ ├── tsconfig.json
│ ├── tsd.json
│ ├── typings
│ │ ├── body-parser
│ │ │ └── body-parser.d.ts
│ │ ├── custom.d.ts
│ │ ├── express-session
│ │ │ └── express-session.d.ts
│ │ ├── express
│ │ │ └── express.d.ts
│ │ ├── mime
│ │ │ └── mime.d.ts
│ │ ├── mongoose
│ │ │ └── mongoose.d.ts
│ │ ├── morgan
│ │ │ └── morgan.d.ts
│ │ ├── node
│ │ │ └── node.d.ts
│ │ ├── serve-static
│ │ │ └── serve-static.d.ts
│ │ └── tsd.d.ts
│ └── views
│ │ └── index.ejs
├── step18_mongodb
│ ├── .gitignore
│ ├── bower.json
│ ├── built
│ │ ├── db.js
│ │ ├── models
│ │ │ ├── IUser.js
│ │ │ └── User.js
│ │ ├── routes
│ │ │ ├── api
│ │ │ │ └── createUser.js
│ │ │ ├── createUserForm.js
│ │ │ └── index.js
│ │ └── server.js
│ ├── gulpfile.js
│ ├── package.json
│ ├── public
│ │ ├── css
│ │ │ └── main.css
│ │ ├── img
│ │ │ └── typescript.png
│ │ └── js
│ │ │ └── createUserForm.js
│ ├── readme.md
│ ├── sass
│ │ ├── globals
│ │ │ └── variables.scss
│ │ ├── main.scss
│ │ └── mystyles
│ │ │ ├── body.scss
│ │ │ ├── extend.scss
│ │ │ └── panel.scss
│ ├── src
│ │ ├── db.ts
│ │ ├── models
│ │ │ ├── IUser.ts
│ │ │ └── User.ts
│ │ ├── routes
│ │ │ ├── api
│ │ │ │ └── createUser.ts
│ │ │ ├── createUserForm.ts
│ │ │ └── index.ts
│ │ └── server.ts
│ ├── tsconfig.json
│ ├── tsd.json
│ ├── typings
│ │ ├── body-parser
│ │ │ └── body-parser.d.ts
│ │ ├── es6-promise
│ │ │ └── es6-promise.d.ts
│ │ ├── express
│ │ │ └── express.d.ts
│ │ ├── mime
│ │ │ └── mime.d.ts
│ │ ├── mongoose
│ │ │ └── mongoose.d.ts
│ │ ├── morgan
│ │ │ └── morgan.d.ts
│ │ ├── node
│ │ │ └── node.d.ts
│ │ ├── serve-static
│ │ │ └── serve-static.d.ts
│ │ ├── tsd.d.ts
│ │ └── whatwg-fetch
│ │ │ └── whatwg-fetch.d.ts
│ ├── views
│ │ ├── createUserForm.ejs
│ │ └── index.ejs
│ └── viewsSrc
│ │ └── createUserForm.ts
├── step19_sass
│ ├── .gitignore
│ ├── built
│ │ ├── routes
│ │ │ ├── index.js
│ │ │ └── second.js
│ │ └── server.js
│ ├── gulpfile.js
│ ├── package.json
│ ├── public
│ │ ├── css
│ │ │ └── mystyles.css
│ │ └── img
│ │ │ └── typescript.png
│ ├── readme.md
│ ├── sass
│ │ └── mystyles.scss
│ ├── src
│ │ ├── routes
│ │ │ ├── index.ts
│ │ │ └── second.ts
│ │ └── server.ts
│ ├── tsconfig.json
│ ├── tsd.json
│ ├── typings
│ │ ├── body-parser
│ │ │ └── body-parser.d.ts
│ │ ├── express
│ │ │ └── express.d.ts
│ │ ├── mime
│ │ │ └── mime.d.ts
│ │ ├── morgan
│ │ │ └── morgan.d.ts
│ │ ├── node
│ │ │ └── node.d.ts
│ │ ├── serve-static
│ │ │ └── serve-static.d.ts
│ │ └── tsd.d.ts
│ └── views
│ │ ├── index.ejs
│ │ └── page2.ejs
├── step1_image
│ ├── .gitignore
│ ├── built
│ │ └── server.js
│ ├── gulpfile.js
│ ├── package.json
│ ├── public
│ │ └── img
│ │ │ └── typescript.png
│ ├── readme.md
│ ├── src
│ │ └── server.ts
│ ├── tsconfig.json
│ ├── tsd.json
│ ├── typings
│ │ ├── body-parser
│ │ │ └── body-parser.d.ts
│ │ ├── express
│ │ │ └── express.d.ts
│ │ ├── mime
│ │ │ └── mime.d.ts
│ │ ├── morgan
│ │ │ └── morgan.d.ts
│ │ ├── node
│ │ │ └── node.d.ts
│ │ ├── serve-static
│ │ │ └── serve-static.d.ts
│ │ └── tsd.d.ts
│ └── views
│ │ └── index.ejs
├── step20_bootstrap
│ ├── .gitignore
│ ├── bower.json
│ ├── built
│ │ ├── routes
│ │ │ ├── index.js
│ │ │ └── second.js
│ │ └── server.js
│ ├── gulpfile.js
│ ├── package.json
│ ├── public
│ │ ├── css
│ │ │ └── main.css
│ │ └── img
│ │ │ └── typescript.png
│ ├── readme.md
│ ├── sass
│ │ ├── main.scss
│ │ └── mystyles
│ │ │ ├── body.scss
│ │ │ └── panel.scss
│ ├── src
│ │ ├── routes
│ │ │ ├── index.ts
│ │ │ └── second.ts
│ │ └── server.ts
│ ├── tsconfig.json
│ ├── tsd.json
│ ├── typings
│ │ ├── body-parser
│ │ │ └── body-parser.d.ts
│ │ ├── express
│ │ │ └── express.d.ts
│ │ ├── mime
│ │ │ └── mime.d.ts
│ │ ├── morgan
│ │ │ └── morgan.d.ts
│ │ ├── node
│ │ │ └── node.d.ts
│ │ ├── serve-static
│ │ │ └── serve-static.d.ts
│ │ └── tsd.d.ts
│ └── views
│ │ ├── index.ejs
│ │ └── page2.ejs
├── step21_bootstrap_override
│ ├── .gitignore
│ ├── bower.json
│ ├── built
│ │ ├── routes
│ │ │ ├── index.js
│ │ │ └── second.js
│ │ └── server.js
│ ├── gulpfile.js
│ ├── package.json
│ ├── public
│ │ ├── css
│ │ │ └── main.css
│ │ └── img
│ │ │ └── typescript.png
│ ├── readme.md
│ ├── sass
│ │ ├── globals
│ │ │ └── variables.scss
│ │ ├── main.scss
│ │ └── mystyles
│ │ │ ├── body.scss
│ │ │ └── panel.scss
│ ├── src
│ │ ├── routes
│ │ │ ├── index.ts
│ │ │ └── second.ts
│ │ └── server.ts
│ ├── tsconfig.json
│ ├── tsd.json
│ ├── typings
│ │ ├── body-parser
│ │ │ └── body-parser.d.ts
│ │ ├── express
│ │ │ └── express.d.ts
│ │ ├── mime
│ │ │ └── mime.d.ts
│ │ ├── morgan
│ │ │ └── morgan.d.ts
│ │ ├── node
│ │ │ └── node.d.ts
│ │ ├── serve-static
│ │ │ └── serve-static.d.ts
│ │ └── tsd.d.ts
│ └── views
│ │ ├── index.ejs
│ │ └── page2.ejs
├── step22_bootstrap_extend
│ ├── .gitignore
│ ├── bower.json
│ ├── built
│ │ ├── routes
│ │ │ ├── index.js
│ │ │ └── second.js
│ │ └── server.js
│ ├── gulpfile.js
│ ├── package.json
│ ├── public
│ │ ├── css
│ │ │ └── main.css
│ │ └── img
│ │ │ └── typescript.png
│ ├── readme.md
│ ├── sass
│ │ ├── globals
│ │ │ └── variables.scss
│ │ ├── main.scss
│ │ └── mystyles
│ │ │ ├── body.scss
│ │ │ ├── extend.scss
│ │ │ └── panel.scss
│ ├── src
│ │ ├── routes
│ │ │ ├── index.ts
│ │ │ └── second.ts
│ │ └── server.ts
│ ├── tsconfig.json
│ ├── tsd.json
│ ├── typings
│ │ ├── body-parser
│ │ │ └── body-parser.d.ts
│ │ ├── express
│ │ │ └── express.d.ts
│ │ ├── mime
│ │ │ └── mime.d.ts
│ │ ├── morgan
│ │ │ └── morgan.d.ts
│ │ ├── node
│ │ │ └── node.d.ts
│ │ ├── serve-static
│ │ │ └── serve-static.d.ts
│ │ └── tsd.d.ts
│ └── views
│ │ ├── index.ejs
│ │ └── page2.ejs
├── step23_es2015_modules
│ ├── .gitignore
│ ├── bower.json
│ ├── built
│ │ ├── models
│ │ │ └── User.js
│ │ ├── routes
│ │ │ ├── index.js
│ │ │ └── second.js
│ │ └── server.js
│ ├── gulpfile.js
│ ├── package.json
│ ├── public
│ │ ├── css
│ │ │ └── main.css
│ │ └── img
│ │ │ └── typescript.png
│ ├── readme.md
│ ├── sass
│ │ ├── globals
│ │ │ └── variables.scss
│ │ ├── main.scss
│ │ └── mystyles
│ │ │ ├── body.scss
│ │ │ ├── extend.scss
│ │ │ └── panel.scss
│ ├── src
│ │ ├── models
│ │ │ └── User.ts
│ │ ├── routes
│ │ │ ├── index.ts
│ │ │ └── second.ts
│ │ └── server.ts
│ ├── tsconfig.json
│ ├── tsd.json
│ ├── typings
│ │ ├── body-parser
│ │ │ └── body-parser.d.ts
│ │ ├── express
│ │ │ └── express.d.ts
│ │ ├── mime
│ │ │ └── mime.d.ts
│ │ ├── morgan
│ │ │ └── morgan.d.ts
│ │ ├── node
│ │ │ └── node.d.ts
│ │ ├── serve-static
│ │ │ └── serve-static.d.ts
│ │ └── tsd.d.ts
│ └── views
│ │ ├── index.ejs
│ │ └── page2.ejs
├── step24_angular2
│ ├── .gitignore
│ ├── dist
│ │ ├── client
│ │ │ ├── app
│ │ │ │ └── app.js
│ │ │ ├── index.html
│ │ │ └── lib
│ │ │ │ ├── angular2.dev.js
│ │ │ │ └── system.src.js
│ │ └── server
│ │ │ └── app.js
│ ├── gulpfile.js
│ ├── gulpfile.ts
│ ├── npm-debug.log
│ ├── package.json
│ ├── readme.md
│ ├── src
│ │ ├── client
│ │ │ ├── app
│ │ │ │ └── app.ts
│ │ │ ├── index.html
│ │ │ └── tsconfig.json
│ │ └── server
│ │ │ ├── app.ts
│ │ │ ├── tsconfig.json
│ │ │ ├── tsd.json
│ │ │ └── typings
│ │ │ ├── express
│ │ │ └── express.d.ts
│ │ │ ├── mime
│ │ │ └── mime.d.ts
│ │ │ ├── node
│ │ │ └── node.d.ts
│ │ │ ├── serve-static
│ │ │ └── serve-static.d.ts
│ │ │ └── tsd.d.ts
│ ├── tsconfig.json
│ ├── tsd.json
│ └── typings
│ │ ├── gulp-nodemon
│ │ └── gulp-nodemon.d.ts
│ │ ├── gulp-typescript
│ │ └── gulp-typescript.d.ts
│ │ ├── gulp
│ │ └── gulp.d.ts
│ │ ├── node
│ │ └── node.d.ts
│ │ ├── orchestrator
│ │ └── orchestrator.d.ts
│ │ ├── q
│ │ └── Q.d.ts
│ │ ├── rimraf
│ │ └── rimraf.d.ts
│ │ └── tsd.d.ts
├── step25_angular2_sass
│ ├── .gitignore
│ ├── dist
│ │ ├── client
│ │ │ ├── app
│ │ │ │ ├── app.css
│ │ │ │ └── app.js
│ │ │ ├── index.html
│ │ │ └── lib
│ │ │ │ ├── angular2.dev.js
│ │ │ │ └── system.src.js
│ │ └── server
│ │ │ └── app.js
│ ├── gulpfile.js
│ ├── gulpfile.ts
│ ├── package.json
│ ├── readme.md
│ ├── src
│ │ ├── client
│ │ │ ├── app
│ │ │ │ ├── app.scss
│ │ │ │ └── app.ts
│ │ │ ├── index.html
│ │ │ └── tsconfig.json
│ │ └── server
│ │ │ ├── app.ts
│ │ │ ├── tsconfig.json
│ │ │ ├── tsd.json
│ │ │ └── typings
│ │ │ ├── express
│ │ │ └── express.d.ts
│ │ │ ├── mime
│ │ │ └── mime.d.ts
│ │ │ ├── node
│ │ │ └── node.d.ts
│ │ │ ├── serve-static
│ │ │ └── serve-static.d.ts
│ │ │ └── tsd.d.ts
│ ├── tsconfig.json
│ ├── tsd.json
│ └── typings
│ │ ├── gulp-nodemon
│ │ └── gulp-nodemon.d.ts
│ │ ├── gulp-sass
│ │ └── gulp-sass.d.ts
│ │ ├── gulp-typescript
│ │ └── gulp-typescript.d.ts
│ │ ├── gulp
│ │ └── gulp.d.ts
│ │ ├── node
│ │ └── node.d.ts
│ │ ├── orchestrator
│ │ └── orchestrator.d.ts
│ │ ├── q
│ │ └── Q.d.ts
│ │ ├── rimraf
│ │ └── rimraf.d.ts
│ │ └── tsd.d.ts
├── step26_angular2_sass_mocha
│ ├── .gitignore
│ ├── dist
│ │ ├── client
│ │ │ ├── app
│ │ │ │ ├── app.css
│ │ │ │ └── app.js
│ │ │ ├── index.html
│ │ │ └── lib
│ │ │ │ ├── angular2.dev.js
│ │ │ │ └── system.src.js
│ │ └── server
│ │ │ └── app.js
│ ├── gulpfile.js
│ ├── gulpfile.ts
│ ├── package.json
│ ├── readme.md
│ ├── src
│ │ ├── client
│ │ │ ├── app
│ │ │ │ ├── app.scss
│ │ │ │ └── app.ts
│ │ │ ├── index.html
│ │ │ └── tsconfig.json
│ │ └── server
│ │ │ ├── app.ts
│ │ │ ├── tsconfig.json
│ │ │ ├── tsd.json
│ │ │ └── typings
│ │ │ ├── express
│ │ │ └── express.d.ts
│ │ │ ├── mime
│ │ │ └── mime.d.ts
│ │ │ ├── node
│ │ │ └── node.d.ts
│ │ │ ├── serve-static
│ │ │ └── serve-static.d.ts
│ │ │ └── tsd.d.ts
│ ├── test
│ │ ├── server_Test.js
│ │ ├── server_Test.ts
│ │ └── tsconfig.json
│ ├── tsconfig.json
│ ├── tsd.json
│ └── typings
│ │ ├── chai
│ │ └── chai.d.ts
│ │ ├── gulp-mocha
│ │ └── gulp-mocha.d.ts
│ │ ├── gulp-nodemon
│ │ └── gulp-nodemon.d.ts
│ │ ├── gulp-sass
│ │ └── gulp-sass.d.ts
│ │ ├── gulp-typescript
│ │ └── gulp-typescript.d.ts
│ │ ├── gulp
│ │ └── gulp.d.ts
│ │ ├── mocha
│ │ └── mocha.d.ts
│ │ ├── node
│ │ └── node.d.ts
│ │ ├── orchestrator
│ │ └── orchestrator.d.ts
│ │ ├── q
│ │ └── Q.d.ts
│ │ ├── rimraf
│ │ └── rimraf.d.ts
│ │ ├── superagent
│ │ └── superagent.d.ts
│ │ ├── supertest
│ │ └── supertest.d.ts
│ │ └── tsd.d.ts
├── step2_middlewares
│ ├── .gitignore
│ ├── .vscode
│ │ └── tasks.json
│ ├── built
│ │ └── server.js
│ ├── gulpfile.js
│ ├── package.json
│ ├── public
│ │ └── img
│ │ │ └── typescript.png
│ ├── readme.md
│ ├── src
│ │ ├── server.js
│ │ └── server.ts
│ ├── tsconfig.json
│ ├── tsd.json
│ ├── typings
│ │ ├── body-parser
│ │ │ └── body-parser.d.ts
│ │ ├── express
│ │ │ └── express.d.ts
│ │ ├── mime
│ │ │ └── mime.d.ts
│ │ ├── node
│ │ │ └── node.d.ts
│ │ ├── serve-static
│ │ │ └── serve-static.d.ts
│ │ └── tsd.d.ts
│ └── views
│ │ └── index.ejs
├── step3_middlewares-multiple
│ ├── .gitignore
│ ├── .vscode
│ │ └── tasks.json
│ ├── built
│ │ └── server.js
│ ├── gulpfile.js
│ ├── package.json
│ ├── public
│ │ └── img
│ │ │ └── typescript.png
│ ├── readme.md
│ ├── src
│ │ ├── server.js
│ │ └── server.ts
│ ├── tsconfig.json
│ ├── tsd.json
│ ├── typings
│ │ ├── body-parser
│ │ │ └── body-parser.d.ts
│ │ ├── express
│ │ │ └── express.d.ts
│ │ ├── mime
│ │ │ └── mime.d.ts
│ │ ├── node
│ │ │ └── node.d.ts
│ │ ├── serve-static
│ │ │ └── serve-static.d.ts
│ │ └── tsd.d.ts
│ └── views
│ │ └── index.ejs
├── step4_middlewares-error-handling
│ ├── .gitignore
│ ├── .vscode
│ │ └── tasks.json
│ ├── built
│ │ └── server.js
│ ├── gulpfile.js
│ ├── package.json
│ ├── public
│ │ └── img
│ │ │ └── typescript.png
│ ├── readme.md
│ ├── src
│ │ ├── server.js
│ │ └── server.ts
│ ├── tsconfig.json
│ ├── tsd.json
│ ├── typings
│ │ ├── body-parser
│ │ │ └── body-parser.d.ts
│ │ ├── express
│ │ │ └── express.d.ts
│ │ ├── mime
│ │ │ └── mime.d.ts
│ │ ├── node
│ │ │ └── node.d.ts
│ │ ├── serve-static
│ │ │ └── serve-static.d.ts
│ │ └── tsd.d.ts
│ └── views
│ │ └── index.ejs
├── step5_middlewares-mounting
│ ├── .gitignore
│ ├── .vscode
│ │ └── tasks.json
│ ├── built
│ │ └── server.js
│ ├── gulpfile.js
│ ├── package.json
│ ├── public
│ │ └── img
│ │ │ └── typescript.png
│ ├── readme.md
│ ├── src
│ │ ├── server.js
│ │ └── server.ts
│ ├── tsconfig.json
│ ├── tsd.json
│ ├── typings
│ │ ├── body-parser
│ │ │ └── body-parser.d.ts
│ │ ├── express
│ │ │ └── express.d.ts
│ │ ├── mime
│ │ │ └── mime.d.ts
│ │ ├── node
│ │ │ └── node.d.ts
│ │ ├── serve-static
│ │ │ └── serve-static.d.ts
│ │ └── tsd.d.ts
│ └── views
│ │ └── index.ejs
├── step6_middlewares-routes
│ ├── .gitignore
│ ├── .vscode
│ │ └── tasks.json
│ ├── built
│ │ └── server.js
│ ├── gulpfile.js
│ ├── package.json
│ ├── public
│ │ └── img
│ │ │ └── typescript.png
│ ├── readme.md
│ ├── src
│ │ ├── server.js
│ │ └── server.ts
│ ├── tsconfig.json
│ ├── tsd.json
│ ├── typings
│ │ ├── body-parser
│ │ │ └── body-parser.d.ts
│ │ ├── express
│ │ │ └── express.d.ts
│ │ ├── mime
│ │ │ └── mime.d.ts
│ │ ├── node
│ │ │ └── node.d.ts
│ │ ├── serve-static
│ │ │ └── serve-static.d.ts
│ │ └── tsd.d.ts
│ └── views
│ │ └── index.ejs
├── step7_routing
│ ├── .gitignore
│ ├── built
│ │ ├── routes
│ │ │ ├── index.js
│ │ │ └── second.js
│ │ └── server.js
│ ├── gulpfile.js
│ ├── package.json
│ ├── public
│ │ └── img
│ │ │ └── typescript.png
│ ├── readme.md
│ ├── src
│ │ ├── routes
│ │ │ ├── index.ts
│ │ │ └── second.ts
│ │ └── server.ts
│ ├── tsconfig.json
│ ├── tsd.json
│ ├── typings
│ │ ├── body-parser
│ │ │ └── body-parser.d.ts
│ │ ├── express
│ │ │ └── express.d.ts
│ │ ├── mime
│ │ │ └── mime.d.ts
│ │ ├── morgan
│ │ │ └── morgan.d.ts
│ │ ├── node
│ │ │ └── node.d.ts
│ │ ├── serve-static
│ │ │ └── serve-static.d.ts
│ │ └── tsd.d.ts
│ └── views
│ │ ├── index.ejs
│ │ └── page2.ejs
├── step8_ejs
│ ├── .gitignore
│ ├── .vscode
│ │ └── tasks.json
│ ├── built
│ │ └── server.js
│ ├── gulpfile.js
│ ├── package.json
│ ├── public
│ │ └── img
│ │ │ └── typescript.png
│ ├── readme.md
│ ├── src
│ │ └── server.ts
│ ├── tsconfig.json
│ ├── tsd.json
│ ├── typings
│ │ ├── body-parser
│ │ │ └── body-parser.d.ts
│ │ ├── express
│ │ │ └── express.d.ts
│ │ ├── mime
│ │ │ └── mime.d.ts
│ │ ├── morgan
│ │ │ └── morgan.d.ts
│ │ ├── node
│ │ │ └── node.d.ts
│ │ ├── serve-static
│ │ │ └── serve-static.d.ts
│ │ └── tsd.d.ts
│ └── views
│ │ ├── ejs-datafromserver.ejs
│ │ ├── ejs.ejs
│ │ └── partial.ejs
├── step9_querystring
│ ├── .gitignore
│ ├── .vscode
│ │ └── tasks.json
│ ├── built
│ │ └── server.js
│ ├── gulpfile.js
│ ├── package.json
│ ├── public
│ │ └── img
│ │ │ └── typescript.png
│ ├── readme.md
│ ├── src
│ │ └── server.ts
│ ├── tsconfig.json
│ ├── tsd.json
│ ├── typings
│ │ ├── body-parser
│ │ │ └── body-parser.d.ts
│ │ ├── express
│ │ │ └── express.d.ts
│ │ ├── mime
│ │ │ └── mime.d.ts
│ │ ├── morgan
│ │ │ └── morgan.d.ts
│ │ ├── node
│ │ │ └── node.d.ts
│ │ ├── serve-static
│ │ │ └── serve-static.d.ts
│ │ └── tsd.d.ts
│ └── views
│ │ └── index.ejs
├── step_test_spa
│ ├── .gitignore
│ ├── client
│ │ └── index.html
│ ├── dist
│ │ ├── client
│ │ │ └── index.html
│ │ └── server
│ │ │ └── app.js
│ ├── gulpfile.js
│ ├── package.json
│ ├── readme.md
│ └── server
│ │ ├── app.ts
│ │ ├── tsconfig.json
│ │ ├── tsd.json
│ │ └── typings
│ │ ├── express
│ │ └── express.d.ts
│ │ ├── mime
│ │ └── mime.d.ts
│ │ ├── node
│ │ └── node.d.ts
│ │ ├── serve-static
│ │ └── serve-static.d.ts
│ │ └── tsd.d.ts
└── typed-express-in-action
│ ├── .eslintrc
│ ├── .nvmrc
│ ├── Chapter_01
│ └── express_hello_world
│ │ ├── .gitignore
│ │ ├── .vscode
│ │ └── tasks.json
│ │ ├── app.js
│ │ ├── app.ts
│ │ ├── package.json
│ │ ├── readme.md
│ │ ├── tsconfig.json
│ │ ├── tsd.json
│ │ └── typings
│ │ ├── express
│ │ └── express.d.ts
│ │ ├── mime
│ │ └── mime.d.ts
│ │ ├── node
│ │ └── node.d.ts
│ │ ├── serve-static
│ │ └── serve-static.d.ts
│ │ └── tsd.d.ts
│ ├── Chapter_02
│ ├── built_in_modules
│ │ ├── .vscode
│ │ │ └── tasks.json
│ │ ├── app.js
│ │ ├── app.ts
│ │ ├── package.json
│ │ ├── readme.md
│ │ ├── tsconfig.json
│ │ ├── tsd.json
│ │ └── typings
│ │ │ ├── node
│ │ │ └── node.d.ts
│ │ │ └── tsd.d.ts
│ ├── defining_modules_es2015
│ │ ├── .vscode
│ │ │ └── tasks.json
│ │ ├── app.js
│ │ ├── app.ts
│ │ ├── package.json
│ │ ├── random-integer.js
│ │ ├── random-integer.ts
│ │ ├── readme.md
│ │ ├── tsconfig.json
│ │ ├── tsd.json
│ │ └── typings
│ │ │ ├── node
│ │ │ └── node.d.ts
│ │ │ └── tsd.d.ts
│ ├── node_hello_world
│ │ ├── .vscode
│ │ │ └── tasks.json
│ │ ├── app.js
│ │ ├── app.ts
│ │ ├── package.json
│ │ ├── readme.md
│ │ ├── tsconfig.json
│ │ ├── tsd.json
│ │ └── typings
│ │ │ ├── node
│ │ │ └── node.d.ts
│ │ │ └── tsd.d.ts
│ ├── node_webserver
│ │ ├── .vscode
│ │ │ └── tasks.json
│ │ ├── app.js
│ │ ├── app.ts
│ │ ├── package.json
│ │ ├── readme.md
│ │ ├── tsconfig.json
│ │ ├── tsd.json
│ │ └── typings
│ │ │ ├── node
│ │ │ └── node.d.ts
│ │ │ └── tsd.d.ts
│ ├── node_webserver_routing
│ │ ├── .vscode
│ │ │ └── tasks.json
│ │ ├── app.js
│ │ ├── app.ts
│ │ ├── package.json
│ │ ├── readme.md
│ │ ├── tsconfig.json
│ │ ├── tsd.json
│ │ └── typings
│ │ │ ├── node
│ │ │ └── node.d.ts
│ │ │ └── tsd.d.ts
│ ├── reading_file_async
│ │ ├── .vscode
│ │ │ └── tasks.json
│ │ ├── app.js
│ │ ├── app.ts
│ │ ├── myfile.txt
│ │ ├── package.json
│ │ ├── readme.md
│ │ ├── tsconfig.json
│ │ ├── tsd.json
│ │ └── typings
│ │ │ ├── node
│ │ │ └── node.d.ts
│ │ │ └── tsd.d.ts
│ └── third_party_modules
│ │ ├── .vscode
│ │ └── tasks.json
│ │ ├── app.js
│ │ ├── app.ts
│ │ ├── package.json
│ │ ├── readme.md
│ │ ├── tsconfig.json
│ │ ├── tsd.json
│ │ └── typings
│ │ ├── mustache
│ │ └── mustache.d.ts
│ │ ├── node
│ │ └── node.d.ts
│ │ └── tsd.d.ts
│ ├── Chapter_03
│ ├── guestbook
│ │ ├── .gitignore
│ │ ├── .vscode
│ │ │ └── tasks.json
│ │ ├── app.js
│ │ ├── app.ts
│ │ ├── converter.js
│ │ ├── converter.ts
│ │ ├── index.html
│ │ ├── package.json
│ │ ├── readme.md
│ │ ├── tsconfig.json
│ │ ├── tsd.json
│ │ ├── typings
│ │ │ ├── body-parser
│ │ │ │ └── body-parser.d.ts
│ │ │ ├── express
│ │ │ │ └── express.d.ts
│ │ │ ├── mime
│ │ │ │ └── mime.d.ts
│ │ │ ├── morgan
│ │ │ │ └── morgan.d.ts
│ │ │ ├── node
│ │ │ │ └── node.d.ts
│ │ │ ├── serve-static
│ │ │ │ └── serve-static.d.ts
│ │ │ └── tsd.d.ts
│ │ └── views
│ │ │ ├── 404.ejs
│ │ │ ├── footer.ejs
│ │ │ ├── header.ejs
│ │ │ ├── index.ejs
│ │ │ └── new-entry.ejs
│ ├── hello-world
│ │ ├── .gitignore
│ │ ├── .vscode
│ │ │ └── tasks.json
│ │ ├── app-simple.js
│ │ ├── app-simple.ts
│ │ ├── app.js
│ │ ├── app.ts
│ │ ├── cool-facts.txt
│ │ ├── package.json
│ │ ├── readme.md
│ │ ├── route-example.js
│ │ ├── route-example.ts
│ │ ├── tsconfig.json
│ │ ├── tsd.json
│ │ └── typings
│ │ │ ├── express
│ │ │ └── express.d.ts
│ │ │ ├── mime
│ │ │ └── mime.d.ts
│ │ │ ├── morgan
│ │ │ └── morgan.d.ts
│ │ │ ├── node
│ │ │ └── node.d.ts
│ │ │ ├── serve-static
│ │ │ └── serve-static.d.ts
│ │ │ └── tsd.d.ts
│ ├── routing
│ │ ├── .gitignore
│ │ ├── .vscode
│ │ │ └── tasks.json
│ │ ├── app.js
│ │ ├── app.ts
│ │ ├── package.json
│ │ ├── public
│ │ │ └── file.txt
│ │ ├── readme.md
│ │ ├── tsconfig.json
│ │ ├── tsd.json
│ │ └── typings
│ │ │ ├── express
│ │ │ └── express.d.ts
│ │ │ ├── mime
│ │ │ └── mime.d.ts
│ │ │ ├── node
│ │ │ └── node.d.ts
│ │ │ ├── serve-static
│ │ │ └── serve-static.d.ts
│ │ │ └── tsd.d.ts
│ ├── statics
│ │ ├── .gitignore
│ │ ├── .vscode
│ │ │ └── tasks.json
│ │ ├── app.js
│ │ ├── app.ts
│ │ ├── package.json
│ │ ├── public
│ │ │ └── file.txt
│ │ ├── readme.md
│ │ ├── tsconfig.json
│ │ ├── tsd.json
│ │ └── typings
│ │ │ ├── express
│ │ │ └── express.d.ts
│ │ │ ├── mime
│ │ │ └── mime.d.ts
│ │ │ ├── node
│ │ │ └── node.d.ts
│ │ │ ├── serve-static
│ │ │ └── serve-static.d.ts
│ │ │ └── tsd.d.ts
│ └── views-example
│ │ ├── .gitignore
│ │ ├── .vscode
│ │ └── tasks.json
│ │ ├── app.js
│ │ ├── app.ts
│ │ ├── package.json
│ │ ├── readme.md
│ │ ├── tsconfig.json
│ │ ├── tsd.json
│ │ ├── typings
│ │ ├── express
│ │ │ └── express.d.ts
│ │ ├── mime
│ │ │ └── mime.d.ts
│ │ ├── node
│ │ │ └── node.d.ts
│ │ ├── serve-static
│ │ │ └── serve-static.d.ts
│ │ └── tsd.d.ts
│ │ └── views
│ │ └── index.ejs
│ ├── Chapter_04
│ ├── error-stack
│ │ ├── .gitignore
│ │ ├── .vscode
│ │ │ └── tasks.json
│ │ ├── app.js
│ │ ├── app.ts
│ │ ├── package.json
│ │ ├── tsconfig.json
│ │ ├── tsd.json
│ │ └── typings
│ │ │ ├── express
│ │ │ └── express.d.ts
│ │ │ ├── mime
│ │ │ └── mime.d.ts
│ │ │ ├── morgan
│ │ │ └── morgan.d.ts
│ │ │ ├── node
│ │ │ └── node.d.ts
│ │ │ ├── serve-static
│ │ │ └── serve-static.d.ts
│ │ │ └── tsd.d.ts
│ └── static-file-fun
│ │ ├── .gitignore
│ │ ├── .vscode
│ │ └── tasks.json
│ │ ├── app.js
│ │ ├── app.ts
│ │ ├── first-version.js
│ │ ├── first-version.ts
│ │ ├── package.json
│ │ ├── static
│ │ └── hello.txt
│ │ ├── tsconfig.json
│ │ ├── tsd.json
│ │ └── typings
│ │ ├── express
│ │ └── express.d.ts
│ │ ├── mime
│ │ └── mime.d.ts
│ │ ├── morgan
│ │ └── morgan.d.ts
│ │ ├── node
│ │ └── node.d.ts
│ │ ├── serve-static
│ │ └── serve-static.d.ts
│ │ └── tsd.d.ts
│ ├── Chapter_05
│ └── temperature-by-zip-code
│ │ ├── .gitignore
│ │ ├── .vscode
│ │ └── tasks.json
│ │ ├── app.js
│ │ ├── app.ts
│ │ ├── package.json
│ │ ├── public
│ │ ├── the.css
│ │ ├── the.js
│ │ └── the.ts
│ │ ├── tsconfig.json
│ │ ├── tsd.json
│ │ ├── typings
│ │ ├── express
│ │ │ └── express.d.ts
│ │ ├── jquery
│ │ │ └── jquery.d.ts
│ │ ├── mime
│ │ │ └── mime.d.ts
│ │ ├── morgan
│ │ │ └── morgan.d.ts
│ │ ├── node
│ │ │ └── node.d.ts
│ │ ├── serve-static
│ │ │ └── serve-static.d.ts
│ │ └── tsd.d.ts
│ │ └── views
│ │ ├── 404.ejs
│ │ ├── footer.ejs
│ │ ├── header.ejs
│ │ └── index.ejs
│ ├── Chapter_06
│ └── random-number-api
│ │ ├── .gitignore
│ │ ├── .vscode
│ │ └── tasks.json
│ │ ├── app.js
│ │ ├── app.ts
│ │ ├── package.json
│ │ ├── tsconfig.json
│ │ ├── tsd.json
│ │ └── typings
│ │ ├── express
│ │ └── express.d.ts
│ │ ├── jquery
│ │ └── jquery.d.ts
│ │ ├── mime
│ │ └── mime.d.ts
│ │ ├── morgan
│ │ └── morgan.d.ts
│ │ ├── node
│ │ └── node.d.ts
│ │ ├── serve-static
│ │ └── serve-static.d.ts
│ │ └── tsd.d.ts
│ ├── Chapter_08
│ └── learn-about-me
│ │ ├── .gitignore
│ │ ├── .vscode
│ │ └── tasks.json
│ │ ├── app.js
│ │ ├── app.ts
│ │ ├── models
│ │ ├── user.js
│ │ └── user.ts
│ │ ├── npm-debug.log
│ │ ├── package.json
│ │ ├── random-number-api
│ │ ├── .gitignore
│ │ ├── .vscode
│ │ │ └── tasks.json
│ │ ├── app.js
│ │ ├── app.ts
│ │ ├── package.json
│ │ ├── tsconfig.json
│ │ ├── tsd.json
│ │ └── typings
│ │ │ ├── express
│ │ │ └── express.d.ts
│ │ │ ├── jquery
│ │ │ └── jquery.d.ts
│ │ │ ├── mime
│ │ │ └── mime.d.ts
│ │ │ ├── morgan
│ │ │ └── morgan.d.ts
│ │ │ ├── node
│ │ │ └── node.d.ts
│ │ │ ├── serve-static
│ │ │ └── serve-static.d.ts
│ │ │ └── tsd.d.ts
│ │ ├── routes.js
│ │ ├── routes.ts
│ │ ├── setuppassport.js
│ │ ├── setuppassport.ts
│ │ ├── tsconfig.json
│ │ ├── tsd.json
│ │ ├── typings
│ │ ├── body-parser
│ │ │ └── body-parser.d.ts
│ │ ├── connect-flash
│ │ │ └── connect-flash.d.ts
│ │ ├── cookie-parser
│ │ │ └── cookie-parser.d.ts
│ │ ├── express-session
│ │ │ └── express-session.d.ts
│ │ ├── express
│ │ │ └── express.d.ts
│ │ ├── jquery
│ │ │ └── jquery.d.ts
│ │ ├── mime
│ │ │ └── mime.d.ts
│ │ ├── mongoose
│ │ │ └── mongoose.d.ts
│ │ ├── morgan
│ │ │ └── morgan.d.ts
│ │ ├── node
│ │ │ └── node.d.ts
│ │ ├── passport-local
│ │ │ └── passport-local.d.ts
│ │ ├── passport
│ │ │ └── passport.d.ts
│ │ ├── serve-static
│ │ │ └── serve-static.d.ts
│ │ └── tsd.d.ts
│ │ └── views
│ │ ├── _footer.ejs
│ │ ├── _header.ejs
│ │ ├── edit.ejs
│ │ ├── index.ejs
│ │ ├── login.ejs
│ │ ├── profile.ejs
│ │ └── signup.ejs
│ ├── Chapter_09
│ ├── simple_tests
│ │ ├── .gitignore
│ │ ├── capitalize.js
│ │ ├── package.json
│ │ └── test
│ │ │ ├── capitalize.js
│ │ │ └── mocha.opts
│ └── whats_my_useragent
│ │ ├── .gitignore
│ │ ├── app.js
│ │ ├── package.json
│ │ ├── test
│ │ ├── html.js
│ │ └── txt.js
│ │ └── views
│ │ └── index.ejs
│ ├── Chapter_10
│ ├── csrf-example
│ │ ├── app.js
│ │ ├── package.json
│ │ └── views
│ │ │ └── index.ejs
│ ├── forever-example
│ │ ├── app.js
│ │ └── package.json
│ └── print-queries
│ │ ├── app.js
│ │ └── package.json
│ ├── Chapter_11
│ ├── grunt-examples
│ │ ├── .gitignore
│ │ ├── Gruntfile.js
│ │ ├── app.js
│ │ ├── my_css
│ │ │ └── main.less
│ │ ├── my_javascripts
│ │ │ └── main.js
│ │ └── package.json
│ └── heroku-app
│ │ ├── .gitignore
│ │ ├── Procfile
│ │ ├── app.js
│ │ └── package.json
│ ├── Chapter_12
│ └── express-generated-app
│ │ ├── .gitignore
│ │ ├── app.js
│ │ ├── bin
│ │ └── www
│ │ ├── package.json
│ │ ├── public
│ │ └── stylesheets
│ │ │ └── style.css
│ │ ├── routes
│ │ ├── index.js
│ │ └── users.js
│ │ └── views
│ │ ├── error.jade
│ │ ├── index.jade
│ │ └── layout.jade
│ ├── README.md
│ └── Vagrantfile
├── step00_helloworld
├── app.js
├── app.ts
├── package.json
└── readme.md
├── step01_chapter01_what_is_express
└── express_hello_world
│ ├── .gitignore
│ ├── app.js
│ ├── app.ts
│ ├── package-lock.json
│ ├── package.json
│ ├── readme.md
│ └── tsconfig.json
├── step02_chapter02_the_basics_of_node.js
├── built_in_modules
│ ├── app.js
│ ├── app.ts
│ ├── package-lock.json
│ ├── package.json
│ ├── readme.md
│ └── tsconfig.json
├── defining_modules_es2015
│ ├── app.js
│ ├── app.ts
│ ├── my-module.js
│ ├── my-module.ts
│ ├── package.json
│ ├── readme.md
│ └── tsconfig.json
├── node_hello_world
│ ├── app.js
│ ├── app.ts
│ ├── package.json
│ ├── readme.md
│ └── tsconfig.json
├── node_webserver
│ ├── app.js
│ ├── app.ts
│ ├── package-lock.json
│ ├── package.json
│ ├── readme.md
│ └── tsconfig.json
├── node_webserver_routing
│ ├── app.js
│ ├── app.ts
│ ├── package-lock.json
│ ├── package.json
│ ├── readme.md
│ └── tsconfig.json
├── reading_file_async
│ ├── app.js
│ ├── app.ts
│ ├── myfile.txt
│ ├── package-lock.json
│ ├── package.json
│ ├── readme.md
│ └── tsconfig.json
└── third_party_modules
│ ├── app.js
│ ├── app.ts
│ ├── package-lock.json
│ ├── package.json
│ ├── readme.md
│ └── tsconfig.json
├── step03_chapter03_foundations_of_express
├── guestbook
│ ├── .gitignore
│ ├── app.js
│ ├── app.ts
│ ├── index.html
│ ├── package-lock.json
│ ├── package.json
│ ├── readme.md
│ ├── tsconfig.json
│ └── views
│ │ ├── 404.ejs
│ │ ├── footer.ejs
│ │ ├── header.ejs
│ │ ├── index.ejs
│ │ └── new-entry.ejs
├── hello-world
│ ├── .gitignore
│ ├── app-simple.js
│ ├── app-simple.ts
│ ├── app.js
│ ├── app.ts
│ ├── cool-facts.txt
│ ├── package.json
│ ├── readme.md
│ ├── route-example.js
│ ├── route-example.ts
│ └── tsconfig.json
├── routing
│ ├── .gitignore
│ ├── app.js
│ ├── app.ts
│ ├── package.json
│ ├── public
│ │ └── file.txt
│ ├── readme.md
│ └── tsconfig.json
├── statics
│ ├── .gitignore
│ ├── app.js
│ ├── app.ts
│ ├── package.json
│ ├── public
│ │ └── file.txt
│ ├── readme.md
│ └── tsconfig.json
└── views-example
│ ├── .gitignore
│ ├── app.js
│ ├── app.ts
│ ├── package.json
│ ├── readme.md
│ ├── tsconfig.json
│ └── views
│ └── index.ejs
├── step04_chapter04_middleware
├── error-stack
│ ├── .gitignore
│ ├── app.js
│ ├── app.ts
│ ├── package.json
│ └── tsconfig.json
└── static-file-fun
│ ├── .gitignore
│ ├── app.js
│ ├── app.ts
│ ├── first-version.js
│ ├── first-version.ts
│ ├── package.json
│ ├── static
│ └── hello.txt
│ └── tsconfig.json
├── step05_chapter05_routing
└── temperature-by-zip-code
│ ├── .gitignore
│ ├── app.js
│ ├── app.ts
│ ├── package.json
│ ├── public
│ ├── the.css
│ ├── the.js
│ └── the.ts
│ ├── tsconfig.json
│ └── views
│ ├── 404.ejs
│ ├── footer.ejs
│ ├── header.ejs
│ └── index.ejs
├── step06_chapter06_building_APIs
└── random-number-api
│ ├── .gitignore
│ ├── app.js
│ ├── app.ts
│ ├── package.json
│ └── tsconfig.json
├── step07_views_ejs
├── .gitignore
├── app.js
├── app.ts
├── package.json
├── public
│ └── img
│ │ └── typescript.png
├── readme.md
├── tsconfig.json
└── views
│ ├── ejs-datafromserver.ejs
│ ├── ejs.ejs
│ └── partial.ejs
├── step08_chapter08_MongoDB
├── learn-about-me
│ ├── .gitignore
│ ├── app.js
│ ├── app.ts
│ ├── models
│ │ ├── user.js
│ │ └── user.ts
│ ├── npm-debug.log
│ ├── package.json
│ ├── random-number-api
│ │ ├── .gitignore
│ │ ├── app.js
│ │ ├── app.ts
│ │ ├── package.json
│ │ └── tsconfig.json
│ ├── routes.js
│ ├── routes.ts
│ ├── setuppassport.js
│ ├── setuppassport.ts
│ ├── tsconfig.json
│ └── views
│ │ ├── _footer.ejs
│ │ ├── _header.ejs
│ │ ├── edit.ejs
│ │ ├── index.ejs
│ │ ├── login.ejs
│ │ ├── profile.ejs
│ │ └── signup.ejs
└── typed_mongoose
│ ├── basic
│ ├── .gitignore
│ ├── IUserModel.js
│ ├── IUserModel.ts
│ ├── User.js
│ ├── User.ts
│ ├── app.js
│ ├── app.ts
│ ├── package.json
│ ├── readme.md
│ ├── shared
│ │ ├── IUser.js
│ │ └── IUser.ts
│ └── tsconfig.json
│ ├── basic2
│ ├── .gitignore
│ ├── app.js
│ ├── app.ts
│ ├── package.json
│ ├── readme.md
│ └── tsconfig.json
│ ├── basic3
│ ├── .gitignore
│ ├── IProjectModel.js
│ ├── IProjectModel.ts
│ ├── IUserModel.js
│ ├── IUserModel.ts
│ ├── Project.js
│ ├── Project.ts
│ ├── User.js
│ ├── User.ts
│ ├── app.js
│ ├── app.ts
│ ├── package.json
│ ├── readme.md
│ ├── shared
│ │ ├── IProject.js
│ │ ├── IProject.ts
│ │ ├── IUser.js
│ │ └── IUser.ts
│ └── tsconfig.json
│ └── basic4
│ ├── .gitignore
│ ├── IProjectModel.js
│ ├── IProjectModel.ts
│ ├── IUserModel.js
│ ├── IUserModel.ts
│ ├── Project.js
│ ├── Project.ts
│ ├── User.js
│ ├── User.ts
│ ├── app.js
│ ├── app.ts
│ ├── package.json
│ ├── readme.md
│ ├── shared
│ ├── IProject.js
│ ├── IProject.ts
│ ├── IUser.js
│ └── IUser.ts
│ └── tsconfig.json
├── step09_chapter09_Testing Express Applications
├── simple_tests
│ ├── .gitignore
│ ├── capitalize.js
│ ├── package.json
│ └── test
│ │ ├── capitalize.js
│ │ └── mocha.opts
└── whats_my_useragent
│ ├── .gitignore
│ ├── app.js
│ ├── package.json
│ ├── test
│ ├── html.js
│ └── txt.js
│ └── views
│ └── index.ejs
├── step10_chapter10_security
├── csrf-example
│ ├── app.js
│ ├── package.json
│ └── views
│ │ └── index.ejs
├── forever-example
│ ├── app.js
│ └── package.json
└── print-queries
│ ├── app.js
│ └── package.json
├── step11_chapter11_Deployment Assets & Heroku
├── grunt-examples
│ ├── .gitignore
│ ├── Gruntfile.js
│ ├── app.js
│ ├── my_css
│ │ └── main.less
│ ├── my_javascripts
│ │ └── main.js
│ └── package.json
└── heroku-app
│ ├── .gitignore
│ ├── Procfile
│ ├── app.js
│ └── package.json
└── step12_chapter12
└── express-generated-app
├── .gitignore
├── app.js
├── bin
└── www
├── package.json
├── public
└── stylesheets
│ └── style.css
├── routes
├── index.js
└── users.js
└── views
├── error.jade
├── index.jade
└── layout.jade
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 |
--------------------------------------------------------------------------------
/_old/step0_hello_express/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 |
--------------------------------------------------------------------------------
/_old/step0_hello_express/readme.md:
--------------------------------------------------------------------------------
1 | Read:
2 | http://www.waltza.com/2015/07/22/new-family-express-4-angular-2-gulp-and-typescript/
3 |
4 | https://code.visualstudio.com/Docs/runtimes/nodejs
--------------------------------------------------------------------------------
/_old/step0_hello_express/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES5",
4 | "module": "commonjs"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/_old/step0_hello_express/typings/tsd.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 | ///
4 | ///
5 |
--------------------------------------------------------------------------------
/_old/step0_hello_express/views/index.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Express using Typescript
6 |
7 |
8 |
9 |
10 | Hello Express using TypeScript
11 |
12 |
13 |
--------------------------------------------------------------------------------
/_old/step10_url-parameters/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 |
--------------------------------------------------------------------------------
/_old/step10_url-parameters/public/img/typescript.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/panacloud/learn-typed-express/abae539066747ea9a5afdd34ed137443ea1cb4cd/_old/step10_url-parameters/public/img/typescript.png
--------------------------------------------------------------------------------
/_old/step10_url-parameters/readme.md:
--------------------------------------------------------------------------------
1 | # req.params:
2 | An object containing properties mapped to the named route “parameters”. For example, if you have the route /user/:name, then the “name” property is available as req.params.name. This object defaults to {}.
3 |
4 | // GET /user/tj
5 | req.params.name
6 | // => "tj"
--------------------------------------------------------------------------------
/_old/step10_url-parameters/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES5",
4 | "module": "commonjs"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/_old/step10_url-parameters/typings/tsd.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 | ///
4 | ///
5 | ///
6 | ///
7 |
--------------------------------------------------------------------------------
/_old/step10_url-parameters/views/index.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/_old/step11_post-bodyparser/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 |
--------------------------------------------------------------------------------
/_old/step11_post-bodyparser/public/img/typescript.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/panacloud/learn-typed-express/abae539066747ea9a5afdd34ed137443ea1cb4cd/_old/step11_post-bodyparser/public/img/typescript.png
--------------------------------------------------------------------------------
/_old/step11_post-bodyparser/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES5",
4 | "module": "commonjs"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/_old/step11_post-bodyparser/typings/tsd.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 | ///
4 | ///
5 | ///
6 | ///
7 |
--------------------------------------------------------------------------------
/_old/step12_express-session/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 |
--------------------------------------------------------------------------------
/_old/step12_express-session/public/img/typescript.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/panacloud/learn-typed-express/abae539066747ea9a5afdd34ed137443ea1cb4cd/_old/step12_express-session/public/img/typescript.png
--------------------------------------------------------------------------------
/_old/step12_express-session/readme.md:
--------------------------------------------------------------------------------
1 | # express-session
2 | Simple session middleware for Express
3 |
4 | Installation
5 | - npm install express-session --save
6 | - tsd install express-session --save
7 |
8 | Example
9 |
10 | app.use(session({
11 | genid: function(req) {
12 | return genuuid() // use UUIDs for session IDs
13 | },
14 | secret: 'any secret string'
15 | }))
16 |
17 | app.get("/", function(req, res){
18 | res.send(req.session);
19 | })
--------------------------------------------------------------------------------
/_old/step12_express-session/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES5",
4 | "module": "commonjs"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/_old/step12_express-session/typings/custom.d.ts:
--------------------------------------------------------------------------------
1 | declare module Express {
2 | export interface Session {
3 | user : { name : string, email : string };
4 | }
5 | }
--------------------------------------------------------------------------------
/_old/step12_express-session/typings/tsd.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 | ///
4 | ///
5 | ///
6 | ///
7 | ///
8 | ///
--------------------------------------------------------------------------------
/_old/step13_rest-api/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 |
--------------------------------------------------------------------------------
/_old/step13_rest-api/.vscode/tasks.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "0.1.0",
3 | "command": "gulp",
4 | "isShellCommand": true,
5 | "args": [
6 | "--no-color"
7 | ],
8 | "tasks": [
9 | {
10 | "taskName": "buildServer",
11 | "args": [],
12 | "isBuildCommand": true,
13 | "isWatching": false,
14 | "problemMatcher": [
15 | "$lessCompile",
16 | "$tsc",
17 | "$jshint"
18 | ]
19 | }
20 | ]
21 | }
--------------------------------------------------------------------------------
/_old/step13_rest-api/public/img/typescript.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/panacloud/learn-typed-express/abae539066747ea9a5afdd34ed137443ea1cb4cd/_old/step13_rest-api/public/img/typescript.png
--------------------------------------------------------------------------------
/_old/step13_rest-api/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES5",
4 | "module": "commonjs"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/_old/step13_rest-api/typings/custom.d.ts:
--------------------------------------------------------------------------------
1 | declare module Express {
2 | export interface Session {
3 | user : { name : string, email : string };
4 | }
5 | }
--------------------------------------------------------------------------------
/_old/step13_rest-api/typings/tsd.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 | ///
4 | ///
5 | ///
6 | ///
7 | ///
8 | ///
--------------------------------------------------------------------------------
/_old/step13_rest-api/views/index.ejs:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/_old/step14_mongodb-insert/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 |
--------------------------------------------------------------------------------
/_old/step14_mongodb-insert/public/img/typescript.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/panacloud/learn-typed-express/abae539066747ea9a5afdd34ed137443ea1cb4cd/_old/step14_mongodb-insert/public/img/typescript.png
--------------------------------------------------------------------------------
/_old/step14_mongodb-insert/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES5",
4 | "module": "commonjs"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/_old/step14_mongodb-insert/typings/custom.d.ts:
--------------------------------------------------------------------------------
1 | declare module Express {
2 | export interface Session {
3 | user : { name : string, email : string };
4 | }
5 | }
--------------------------------------------------------------------------------
/_old/step14_mongodb-insert/typings/tsd.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 | ///
4 | ///
5 | ///
6 | ///
7 | ///
8 | ///
9 |
--------------------------------------------------------------------------------
/_old/step14_mongodb-insert/views/index.ejs:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/_old/step15_mongodb-find/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 |
--------------------------------------------------------------------------------
/_old/step15_mongodb-find/public/img/typescript.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/panacloud/learn-typed-express/abae539066747ea9a5afdd34ed137443ea1cb4cd/_old/step15_mongodb-find/public/img/typescript.png
--------------------------------------------------------------------------------
/_old/step15_mongodb-find/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES5",
4 | "module": "commonjs"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/_old/step15_mongodb-find/typings/custom.d.ts:
--------------------------------------------------------------------------------
1 | declare module Express {
2 | export interface Session {
3 | user : { name : string, email : string };
4 | }
5 | }
--------------------------------------------------------------------------------
/_old/step15_mongodb-find/typings/tsd.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 | ///
4 | ///
5 | ///
6 | ///
7 | ///
8 | ///
9 |
--------------------------------------------------------------------------------
/_old/step15_mongodb-find/views/index.ejs:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/_old/step16_mongodb-remove/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 |
--------------------------------------------------------------------------------
/_old/step16_mongodb-remove/public/img/typescript.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/panacloud/learn-typed-express/abae539066747ea9a5afdd34ed137443ea1cb4cd/_old/step16_mongodb-remove/public/img/typescript.png
--------------------------------------------------------------------------------
/_old/step16_mongodb-remove/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES5",
4 | "module": "commonjs"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/_old/step16_mongodb-remove/typings/custom.d.ts:
--------------------------------------------------------------------------------
1 | declare module Express {
2 | export interface Session {
3 | user : { name : string, email : string };
4 | }
5 | }
--------------------------------------------------------------------------------
/_old/step16_mongodb-remove/typings/tsd.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 | ///
4 | ///
5 | ///
6 | ///
7 | ///
8 | ///
9 |
--------------------------------------------------------------------------------
/_old/step16_mongodb-remove/views/index.ejs:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/_old/step17_mongodb-update/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 |
--------------------------------------------------------------------------------
/_old/step17_mongodb-update/public/img/typescript.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/panacloud/learn-typed-express/abae539066747ea9a5afdd34ed137443ea1cb4cd/_old/step17_mongodb-update/public/img/typescript.png
--------------------------------------------------------------------------------
/_old/step17_mongodb-update/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES5",
4 | "module": "commonjs"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/_old/step17_mongodb-update/typings/custom.d.ts:
--------------------------------------------------------------------------------
1 | declare module Express {
2 | export interface Session {
3 | user : { name : string, email : string };
4 | }
5 | }
--------------------------------------------------------------------------------
/_old/step17_mongodb-update/typings/tsd.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 | ///
4 | ///
5 | ///
6 | ///
7 | ///
8 | ///
9 |
--------------------------------------------------------------------------------
/_old/step17_mongodb-update/views/index.ejs:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/_old/step18_mongodb/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | bower_components
3 |
--------------------------------------------------------------------------------
/_old/step18_mongodb/bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "step4_bootstrap",
3 | "version": "0.0.0",
4 | "homepage": "https://github.com/ziaukhan/learn-node-typescript",
5 | "authors": [
6 | "Zia Khan "
7 | ],
8 | "moduleType": [
9 | "amd",
10 | "node"
11 | ],
12 | "license": "MIT",
13 | "ignore": [
14 | "**/.*",
15 | "node_modules",
16 | "bower_components",
17 | "test",
18 | "tests"
19 | ],
20 | "dependencies": {
21 | "bootstrap-sass": "~3.3.5"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/_old/step18_mongodb/built/db.js:
--------------------------------------------------------------------------------
1 | ///
2 | var mongoose = require('mongoose');
3 | mongoose.connect('mongodb://localhost/test');
4 | exports["default"] = mongoose;
5 |
--------------------------------------------------------------------------------
/_old/step18_mongodb/built/models/IUser.js:
--------------------------------------------------------------------------------
1 | // http://stackoverflow.com/questions/30270084/why-the-limitation-on-exporting-an-interface-by-default-in-typescript
2 |
--------------------------------------------------------------------------------
/_old/step18_mongodb/built/models/User.js:
--------------------------------------------------------------------------------
1 | //import mongoose = require("mongoose");
2 | var db_1 = require('../db');
3 | var userSchema = new db_1["default"].Schema({
4 | email: String,
5 | password: String,
6 | displayName: String
7 | });
8 | exports.User = db_1["default"].model("User", userSchema);
9 |
--------------------------------------------------------------------------------
/_old/step18_mongodb/built/routes/createUserForm.js:
--------------------------------------------------------------------------------
1 | ///
2 | var express = require('express');
3 | var router = express.Router();
4 | /* GET new User */
5 | router.get('/', function (req, res, next) {
6 | res.render('createUserForm');
7 | });
8 | module.exports = router;
9 |
--------------------------------------------------------------------------------
/_old/step18_mongodb/built/routes/index.js:
--------------------------------------------------------------------------------
1 | ///
2 | var express = require('express');
3 | var router = express.Router();
4 | /* GET home page. */
5 | router.get('/', function (req, res, next) {
6 | res.render('index', { title: 'Multi-page Express app using Typescript and Bootstrap' });
7 | });
8 | module.exports = router;
9 |
--------------------------------------------------------------------------------
/_old/step18_mongodb/public/img/typescript.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/panacloud/learn-typed-express/abae539066747ea9a5afdd34ed137443ea1cb4cd/_old/step18_mongodb/public/img/typescript.png
--------------------------------------------------------------------------------
/_old/step18_mongodb/readme.md:
--------------------------------------------------------------------------------
1 | Read:
2 | https://github.com/Appsilon/styleguide/wiki/mongoose-typescript-models
3 | https://gist.github.com/masahirompp/3c012c8721b70821fa45
4 | https://gist.github.com/masahirompp/6cfdfd1e007187e61310
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/_old/step18_mongodb/sass/globals/variables.scss:
--------------------------------------------------------------------------------
1 | $font-size-base: 20px;
--------------------------------------------------------------------------------
/_old/step18_mongodb/sass/main.scss:
--------------------------------------------------------------------------------
1 | // inject:global
2 | // endinject
3 |
4 |
5 | // bower:scss
6 | // endbower
7 |
8 |
9 | // inject:app
10 | // endinject
--------------------------------------------------------------------------------
/_old/step18_mongodb/sass/mystyles/body.scss:
--------------------------------------------------------------------------------
1 | $primary-color: red;
2 | body {
3 | background-color: $primary-color;
4 | }
5 |
--------------------------------------------------------------------------------
/_old/step18_mongodb/sass/mystyles/extend.scss:
--------------------------------------------------------------------------------
1 | .main-area {
2 | @extend .row;
3 | }
4 | .column {
5 | @extend .col-md-4;
6 | }
7 | .content {
8 | @extend .col-xs-6;
9 | @extend .col-sm-6;
10 | }
11 | .sidebar {
12 | @extend .col-xs-4;
13 | @extend .col-sm-4;
14 | }
15 | .side-nav {
16 | @extend .col-sm-2;
17 | @extend .col-sm-2;
18 | }
--------------------------------------------------------------------------------
/_old/step18_mongodb/sass/mystyles/panel.scss:
--------------------------------------------------------------------------------
1 | .panel {
2 | color: $primary-color;
3 | }
4 |
5 |
--------------------------------------------------------------------------------
/_old/step18_mongodb/src/db.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
3 | import mongoose = require('mongoose');
4 | mongoose.connect('mongodb://localhost/test');
5 | export default mongoose;
--------------------------------------------------------------------------------
/_old/step18_mongodb/src/models/IUser.ts:
--------------------------------------------------------------------------------
1 | // http://stackoverflow.com/questions/30270084/why-the-limitation-on-exporting-an-interface-by-default-in-typescript
2 |
3 | interface IUser {
4 | email: string;
5 | password: string;
6 | displayName: string;
7 | }
8 |
9 | export default IUser;
10 |
--------------------------------------------------------------------------------
/_old/step18_mongodb/src/models/User.ts:
--------------------------------------------------------------------------------
1 | //import mongoose = require("mongoose");
2 | import mongoose from '../db';
3 |
4 | //https://github.com/horiuchi/DefinitelyTyped/blob/master/mongoose/mongoose-tests.ts
5 | import IUser from 'IUser';
6 |
7 | export interface IUserModel extends IUser, mongoose.Document { }
8 |
9 | var userSchema = new mongoose.Schema({
10 | email: String,
11 | password: String,
12 | displayName: String
13 | });
14 |
15 |
16 | export let User = mongoose.model("User", userSchema);
17 |
18 |
19 |
--------------------------------------------------------------------------------
/_old/step18_mongodb/src/routes/createUserForm.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
3 | import express = require('express');
4 | var router = express.Router();
5 | import {IUserModel, User} from '../models/User';
6 |
7 | /* GET new User */
8 | router.get('/', function(req, res, next) {
9 | res.render('createUserForm');
10 | });
11 |
12 |
13 |
14 | export = router;
--------------------------------------------------------------------------------
/_old/step18_mongodb/src/routes/index.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
3 | import express = require('express');
4 | var router = express.Router();
5 |
6 | /* GET home page. */
7 | router.get('/', function(req, res, next) {
8 | res.render('index', { title: 'Multi-page Express app using Typescript and Bootstrap' });
9 | });
10 |
11 | export = router;
--------------------------------------------------------------------------------
/_old/step18_mongodb/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES5",
4 | "module": "commonjs"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/_old/step18_mongodb/typings/tsd.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 | ///
4 | ///
5 | ///
6 | ///
7 | ///
8 | ///
9 | ///
10 |
--------------------------------------------------------------------------------
/_old/step19_sass/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 |
--------------------------------------------------------------------------------
/_old/step19_sass/built/routes/index.js:
--------------------------------------------------------------------------------
1 | ///
2 | var express = require('express');
3 | var router = express.Router();
4 | /* GET home page. */
5 | router.get('/', function (req, res, next) {
6 | res.render('index', { title: 'Multi-page Express app using Typescript and SCSS' });
7 | });
8 | module.exports = router;
9 |
--------------------------------------------------------------------------------
/_old/step19_sass/built/routes/second.js:
--------------------------------------------------------------------------------
1 | ///
2 | var express = require('express');
3 | var router = express.Router();
4 | /* GET second page. */
5 | router.get('/', function (req, res, next) {
6 | res.render('page2', { titleData: 'This is the second page' });
7 | });
8 | module.exports = router;
9 |
--------------------------------------------------------------------------------
/_old/step19_sass/public/css/mystyles.css:
--------------------------------------------------------------------------------
1 | body {
2 | background: #eeffcc; }
3 |
--------------------------------------------------------------------------------
/_old/step19_sass/public/img/typescript.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/panacloud/learn-typed-express/abae539066747ea9a5afdd34ed137443ea1cb4cd/_old/step19_sass/public/img/typescript.png
--------------------------------------------------------------------------------
/_old/step19_sass/readme.md:
--------------------------------------------------------------------------------
1 | Read:
2 | http://ryanchristiani.com/getting-started-with-gulp-and-sass/
3 |
4 | To learn SCSS go to:
5 | https://scotch.io/tutorials/getting-started-with-sass
6 |
7 | Best way is to read this book:
8 | https://www.safaribooksonline.com/library/view/sass-essentials/9781782174301/
--------------------------------------------------------------------------------
/_old/step19_sass/sass/mystyles.scss:
--------------------------------------------------------------------------------
1 | $primaryColor: #eeffcc;
2 |
3 | body {
4 | background: $primaryColor;
5 | }
6 |
--------------------------------------------------------------------------------
/_old/step19_sass/src/routes/index.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
3 | import express = require('express');
4 | var router = express.Router();
5 |
6 | /* GET home page. */
7 | router.get('/', function(req, res, next) {
8 | res.render('index', { title: 'Multi-page Express app using Typescript and SCSS' });
9 | });
10 |
11 | export = router;
--------------------------------------------------------------------------------
/_old/step19_sass/src/routes/second.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
3 | import express = require('express');
4 | var router = express.Router();
5 |
6 | /* GET second page. */
7 | router.get('/', function(req, res, next) {
8 | res.render('page2', { titleData: 'This is the second page' });
9 | });
10 |
11 | export = router;
--------------------------------------------------------------------------------
/_old/step19_sass/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES5",
4 | "module": "commonjs"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/_old/step19_sass/typings/tsd.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 | ///
4 | ///
5 | ///
6 | ///
7 |
--------------------------------------------------------------------------------
/_old/step19_sass/views/index.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Express using Typescript
6 |
7 |
8 |
9 |
10 | <%= title %>
11 |
12 | Go to second page
13 |
14 |
--------------------------------------------------------------------------------
/_old/step19_sass/views/page2.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Express Page 2 using Typescript
6 |
7 |
8 |
9 |
10 | <%= titleData %>
11 | Back to main page
12 |
13 |
14 |
--------------------------------------------------------------------------------
/_old/step1_image/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 |
--------------------------------------------------------------------------------
/_old/step1_image/public/img/typescript.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/panacloud/learn-typed-express/abae539066747ea9a5afdd34ed137443ea1cb4cd/_old/step1_image/public/img/typescript.png
--------------------------------------------------------------------------------
/_old/step1_image/readme.md:
--------------------------------------------------------------------------------
1 | Follow:
2 | https://github.com/czechboy0/Express-4x-Typescript-Sample
--------------------------------------------------------------------------------
/_old/step1_image/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES5",
4 | "module": "commonjs"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/_old/step1_image/typings/tsd.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 | ///
4 | ///
5 | ///
6 | ///
7 |
--------------------------------------------------------------------------------
/_old/step1_image/views/index.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Express using Typescript
6 |
7 |
8 |
9 |
10 | Hello Express using TypeScript
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/_old/step20_bootstrap/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | bower_components
3 |
--------------------------------------------------------------------------------
/_old/step20_bootstrap/bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "step4_bootstrap",
3 | "version": "0.0.0",
4 | "homepage": "https://github.com/ziaukhan/learn-node-typescript",
5 | "authors": [
6 | "Zia Khan "
7 | ],
8 | "moduleType": [
9 | "amd",
10 | "node"
11 | ],
12 | "license": "MIT",
13 | "ignore": [
14 | "**/.*",
15 | "node_modules",
16 | "bower_components",
17 | "test",
18 | "tests"
19 | ],
20 | "dependencies": {
21 | "bootstrap-sass": "~3.3.5"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/_old/step20_bootstrap/built/routes/index.js:
--------------------------------------------------------------------------------
1 | ///
2 | var express = require('express');
3 | var router = express.Router();
4 | /* GET home page. */
5 | router.get('/', function (req, res, next) {
6 | res.render('index', { title: 'Multi-page Express app using Typescript and Bootstrap' });
7 | });
8 | module.exports = router;
9 |
--------------------------------------------------------------------------------
/_old/step20_bootstrap/built/routes/second.js:
--------------------------------------------------------------------------------
1 | ///
2 | var express = require('express');
3 | var router = express.Router();
4 | /* GET second page. */
5 | router.get('/', function (req, res, next) {
6 | res.render('page2', { titleData: 'This is the second page' });
7 | });
8 | module.exports = router;
9 |
--------------------------------------------------------------------------------
/_old/step20_bootstrap/public/img/typescript.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/panacloud/learn-typed-express/abae539066747ea9a5afdd34ed137443ea1cb4cd/_old/step20_bootstrap/public/img/typescript.png
--------------------------------------------------------------------------------
/_old/step20_bootstrap/readme.md:
--------------------------------------------------------------------------------
1 | Read:
2 | http://david-barreto.com/working-with-sass-bootstrap-and-gulp/
--------------------------------------------------------------------------------
/_old/step20_bootstrap/sass/main.scss:
--------------------------------------------------------------------------------
1 | // bower:scss
2 | // endbower
3 |
4 |
5 | // inject:app
6 | // endinject
--------------------------------------------------------------------------------
/_old/step20_bootstrap/sass/mystyles/body.scss:
--------------------------------------------------------------------------------
1 | $primary-color: red;
2 | body {
3 | background-color: $primary-color;
4 | }
5 |
--------------------------------------------------------------------------------
/_old/step20_bootstrap/sass/mystyles/panel.scss:
--------------------------------------------------------------------------------
1 | .panel {
2 | color: $primary-color;
3 | }
4 |
5 |
--------------------------------------------------------------------------------
/_old/step20_bootstrap/src/routes/index.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
3 | import express = require('express');
4 | var router = express.Router();
5 |
6 | /* GET home page. */
7 | router.get('/', function(req, res, next) {
8 | res.render('index', { title: 'Multi-page Express app using Typescript and Bootstrap' });
9 | });
10 |
11 | export = router;
--------------------------------------------------------------------------------
/_old/step20_bootstrap/src/routes/second.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
3 | import express = require('express');
4 | var router = express.Router();
5 |
6 | /* GET second page. */
7 | router.get('/', function(req, res, next) {
8 | res.render('page2', { titleData: 'This is the second page' });
9 | });
10 |
11 | export = router;
--------------------------------------------------------------------------------
/_old/step20_bootstrap/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES5",
4 | "module": "commonjs"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/_old/step20_bootstrap/typings/tsd.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 | ///
4 | ///
5 | ///
6 | ///
7 |
--------------------------------------------------------------------------------
/_old/step20_bootstrap/views/page2.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Express Page 2 using Typescript
6 |
7 |
8 |
9 |
10 | <%= titleData %>
11 | Back to main page
12 |
13 |
14 |
--------------------------------------------------------------------------------
/_old/step21_bootstrap_override/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | bower_components
3 |
--------------------------------------------------------------------------------
/_old/step21_bootstrap_override/bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "step4_bootstrap",
3 | "version": "0.0.0",
4 | "homepage": "https://github.com/ziaukhan/learn-node-typescript",
5 | "authors": [
6 | "Zia Khan "
7 | ],
8 | "moduleType": [
9 | "amd",
10 | "node"
11 | ],
12 | "license": "MIT",
13 | "ignore": [
14 | "**/.*",
15 | "node_modules",
16 | "bower_components",
17 | "test",
18 | "tests"
19 | ],
20 | "dependencies": {
21 | "bootstrap-sass": "~3.3.5"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/_old/step21_bootstrap_override/built/routes/index.js:
--------------------------------------------------------------------------------
1 | ///
2 | var express = require('express');
3 | var router = express.Router();
4 | /* GET home page. */
5 | router.get('/', function (req, res, next) {
6 | res.render('index', { title: 'Multi-page Express app using Typescript and Bootstrap' });
7 | });
8 | module.exports = router;
9 |
--------------------------------------------------------------------------------
/_old/step21_bootstrap_override/built/routes/second.js:
--------------------------------------------------------------------------------
1 | ///
2 | var express = require('express');
3 | var router = express.Router();
4 | /* GET second page. */
5 | router.get('/', function (req, res, next) {
6 | res.render('page2', { titleData: 'This is the second page' });
7 | });
8 | module.exports = router;
9 |
--------------------------------------------------------------------------------
/_old/step21_bootstrap_override/public/img/typescript.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/panacloud/learn-typed-express/abae539066747ea9a5afdd34ed137443ea1cb4cd/_old/step21_bootstrap_override/public/img/typescript.png
--------------------------------------------------------------------------------
/_old/step21_bootstrap_override/readme.md:
--------------------------------------------------------------------------------
1 | Read:
2 | http://david-barreto.com/working-with-sass-bootstrap-and-gulp/
--------------------------------------------------------------------------------
/_old/step21_bootstrap_override/sass/globals/variables.scss:
--------------------------------------------------------------------------------
1 | $font-size-base: 20px;
--------------------------------------------------------------------------------
/_old/step21_bootstrap_override/sass/main.scss:
--------------------------------------------------------------------------------
1 | // inject:global
2 | // endinject
3 |
4 |
5 | // bower:scss
6 | // endbower
7 |
8 |
9 | // inject:app
10 | // endinject
--------------------------------------------------------------------------------
/_old/step21_bootstrap_override/sass/mystyles/body.scss:
--------------------------------------------------------------------------------
1 | $primary-color: red;
2 | body {
3 | background-color: $primary-color;
4 | }
5 |
--------------------------------------------------------------------------------
/_old/step21_bootstrap_override/sass/mystyles/panel.scss:
--------------------------------------------------------------------------------
1 | .panel {
2 | color: $primary-color;
3 | }
4 |
5 |
--------------------------------------------------------------------------------
/_old/step21_bootstrap_override/src/routes/index.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
3 | import express = require('express');
4 | var router = express.Router();
5 |
6 | /* GET home page. */
7 | router.get('/', function(req, res, next) {
8 | res.render('index', { title: 'Multi-page Express app using Typescript and Bootstrap' });
9 | });
10 |
11 | export = router;
--------------------------------------------------------------------------------
/_old/step21_bootstrap_override/src/routes/second.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
3 | import express = require('express');
4 | var router = express.Router();
5 |
6 | /* GET second page. */
7 | router.get('/', function(req, res, next) {
8 | res.render('page2', { titleData: 'This is the second page' });
9 | });
10 |
11 | export = router;
--------------------------------------------------------------------------------
/_old/step21_bootstrap_override/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES5",
4 | "module": "commonjs"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/_old/step21_bootstrap_override/typings/tsd.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 | ///
4 | ///
5 | ///
6 | ///
7 |
--------------------------------------------------------------------------------
/_old/step21_bootstrap_override/views/page2.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Express Page 2 using Typescript
6 |
7 |
8 |
9 |
10 | <%= titleData %>
11 | Back to main page
12 |
13 |
14 |
--------------------------------------------------------------------------------
/_old/step22_bootstrap_extend/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | bower_components
3 |
--------------------------------------------------------------------------------
/_old/step22_bootstrap_extend/bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "step4_bootstrap",
3 | "version": "0.0.0",
4 | "homepage": "https://github.com/ziaukhan/learn-node-typescript",
5 | "authors": [
6 | "Zia Khan "
7 | ],
8 | "moduleType": [
9 | "amd",
10 | "node"
11 | ],
12 | "license": "MIT",
13 | "ignore": [
14 | "**/.*",
15 | "node_modules",
16 | "bower_components",
17 | "test",
18 | "tests"
19 | ],
20 | "dependencies": {
21 | "bootstrap-sass": "~3.3.5"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/_old/step22_bootstrap_extend/built/routes/index.js:
--------------------------------------------------------------------------------
1 | ///
2 | var express = require('express');
3 | var router = express.Router();
4 | /* GET home page. */
5 | router.get('/', function (req, res, next) {
6 | res.render('index', { title: 'Multi-page Express app using Typescript and Bootstrap' });
7 | });
8 | module.exports = router;
9 |
--------------------------------------------------------------------------------
/_old/step22_bootstrap_extend/built/routes/second.js:
--------------------------------------------------------------------------------
1 | ///
2 | var express = require('express');
3 | var router = express.Router();
4 | /* GET second page. */
5 | router.get('/', function (req, res, next) {
6 | res.render('page2', { titleData: 'This is the second page' });
7 | });
8 | module.exports = router;
9 |
--------------------------------------------------------------------------------
/_old/step22_bootstrap_extend/public/img/typescript.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/panacloud/learn-typed-express/abae539066747ea9a5afdd34ed137443ea1cb4cd/_old/step22_bootstrap_extend/public/img/typescript.png
--------------------------------------------------------------------------------
/_old/step22_bootstrap_extend/readme.md:
--------------------------------------------------------------------------------
1 | Read:
2 | http://www.hongkiat.com/blog/bootstrap-and-sass/
3 |
--------------------------------------------------------------------------------
/_old/step22_bootstrap_extend/sass/globals/variables.scss:
--------------------------------------------------------------------------------
1 | $font-size-base: 20px;
--------------------------------------------------------------------------------
/_old/step22_bootstrap_extend/sass/main.scss:
--------------------------------------------------------------------------------
1 | // inject:global
2 | // endinject
3 |
4 |
5 | // bower:scss
6 | // endbower
7 |
8 |
9 | // inject:app
10 | // endinject
--------------------------------------------------------------------------------
/_old/step22_bootstrap_extend/sass/mystyles/body.scss:
--------------------------------------------------------------------------------
1 | $primary-color: red;
2 | body {
3 | background-color: $primary-color;
4 | }
5 |
--------------------------------------------------------------------------------
/_old/step22_bootstrap_extend/sass/mystyles/extend.scss:
--------------------------------------------------------------------------------
1 | .main-area {
2 | @extend .row;
3 | }
4 | .column {
5 | @extend .col-md-4;
6 | }
7 | .content {
8 | @extend .col-xs-6;
9 | @extend .col-sm-6;
10 | }
11 | .sidebar {
12 | @extend .col-xs-4;
13 | @extend .col-sm-4;
14 | }
15 | .side-nav {
16 | @extend .col-sm-2;
17 | @extend .col-sm-2;
18 | }
--------------------------------------------------------------------------------
/_old/step22_bootstrap_extend/sass/mystyles/panel.scss:
--------------------------------------------------------------------------------
1 | .panel {
2 | color: $primary-color;
3 | }
4 |
5 |
--------------------------------------------------------------------------------
/_old/step22_bootstrap_extend/src/routes/index.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
3 | import express = require('express');
4 | var router = express.Router();
5 |
6 | /* GET home page. */
7 | router.get('/', function(req, res, next) {
8 | res.render('index', { title: 'Multi-page Express app using Typescript and Bootstrap' });
9 | });
10 |
11 | export = router;
--------------------------------------------------------------------------------
/_old/step22_bootstrap_extend/src/routes/second.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
3 | import express = require('express');
4 | var router = express.Router();
5 |
6 | /* GET second page. */
7 | router.get('/', function(req, res, next) {
8 | res.render('page2', { titleData: 'This is the second page' });
9 | });
10 |
11 | export = router;
--------------------------------------------------------------------------------
/_old/step22_bootstrap_extend/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES5",
4 | "module": "commonjs"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/_old/step22_bootstrap_extend/typings/tsd.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 | ///
4 | ///
5 | ///
6 | ///
7 |
--------------------------------------------------------------------------------
/_old/step22_bootstrap_extend/views/page2.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Express Page 2 using Typescript
6 |
7 |
8 |
9 |
10 | <%= titleData %>
11 | Back to main page
12 |
13 |
14 |
--------------------------------------------------------------------------------
/_old/step23_es2015_modules/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | bower_components
3 |
--------------------------------------------------------------------------------
/_old/step23_es2015_modules/bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "step4_bootstrap",
3 | "version": "0.0.0",
4 | "homepage": "https://github.com/ziaukhan/learn-node-typescript",
5 | "authors": [
6 | "Zia Khan "
7 | ],
8 | "moduleType": [
9 | "amd",
10 | "node"
11 | ],
12 | "license": "MIT",
13 | "ignore": [
14 | "**/.*",
15 | "node_modules",
16 | "bower_components",
17 | "test",
18 | "tests"
19 | ],
20 | "dependencies": {
21 | "bootstrap-sass": "~3.3.5"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/_old/step23_es2015_modules/built/models/User.js:
--------------------------------------------------------------------------------
1 | var User = (function () {
2 | function User(name) {
3 | this.name = name;
4 | }
5 | User.prototype.browsing = function () {
6 | return this.name + " is a User from a ES2015 class/module and is eating";
7 | };
8 | return User;
9 | })();
10 | exports["default"] = User;
11 |
--------------------------------------------------------------------------------
/_old/step23_es2015_modules/built/routes/index.js:
--------------------------------------------------------------------------------
1 | ///
2 | var express = require('express');
3 | var router = express.Router();
4 | /* GET home page. */
5 | router.get('/', function (req, res, next) {
6 | res.render('index', { title: 'Multi-page Express app using Typescript and Bootstrap' });
7 | });
8 | module.exports = router;
9 |
--------------------------------------------------------------------------------
/_old/step23_es2015_modules/built/routes/second.js:
--------------------------------------------------------------------------------
1 | ///
2 | var express = require('express');
3 | var User_1 = require('../models/User');
4 | var router = express.Router();
5 | var u = new User_1["default"]("Zia");
6 | /* GET second page. */
7 | router.get('/', function (req, res, next) {
8 | res.render('page2', { titleData: u.browsing() });
9 | });
10 | module.exports = router;
11 |
--------------------------------------------------------------------------------
/_old/step23_es2015_modules/public/img/typescript.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/panacloud/learn-typed-express/abae539066747ea9a5afdd34ed137443ea1cb4cd/_old/step23_es2015_modules/public/img/typescript.png
--------------------------------------------------------------------------------
/_old/step23_es2015_modules/readme.md:
--------------------------------------------------------------------------------
1 | Using ES2015 modules, check the code in routes/second.ts file
2 |
3 | Read:
4 | https://github.com/ziaukhan/learn-typescript/tree/master/step35_modules
5 |
--------------------------------------------------------------------------------
/_old/step23_es2015_modules/sass/globals/variables.scss:
--------------------------------------------------------------------------------
1 | $font-size-base: 20px;
--------------------------------------------------------------------------------
/_old/step23_es2015_modules/sass/main.scss:
--------------------------------------------------------------------------------
1 | // inject:global
2 | // endinject
3 |
4 |
5 | // bower:scss
6 | // endbower
7 |
8 |
9 | // inject:app
10 | // endinject
--------------------------------------------------------------------------------
/_old/step23_es2015_modules/sass/mystyles/body.scss:
--------------------------------------------------------------------------------
1 | $primary-color: red;
2 | body {
3 | background-color: $primary-color;
4 | }
5 |
--------------------------------------------------------------------------------
/_old/step23_es2015_modules/sass/mystyles/extend.scss:
--------------------------------------------------------------------------------
1 | .main-area {
2 | @extend .row;
3 | }
4 | .column {
5 | @extend .col-md-4;
6 | }
7 | .content {
8 | @extend .col-xs-6;
9 | @extend .col-sm-6;
10 | }
11 | .sidebar {
12 | @extend .col-xs-4;
13 | @extend .col-sm-4;
14 | }
15 | .side-nav {
16 | @extend .col-sm-2;
17 | @extend .col-sm-2;
18 | }
--------------------------------------------------------------------------------
/_old/step23_es2015_modules/sass/mystyles/panel.scss:
--------------------------------------------------------------------------------
1 | .panel {
2 | color: $primary-color;
3 | }
4 |
5 |
--------------------------------------------------------------------------------
/_old/step23_es2015_modules/src/models/User.ts:
--------------------------------------------------------------------------------
1 | export default class User {
2 | name: string;
3 |
4 | constructor(name: string){
5 | this.name = name;
6 | }
7 |
8 | browsing(){
9 | return this.name + " is a User from a ES2015 class/module and is eating";
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/_old/step23_es2015_modules/src/routes/index.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
3 | import express = require('express');
4 | var router = express.Router();
5 |
6 | /* GET home page. */
7 | router.get('/', function(req, res, next) {
8 | res.render('index', { title: 'Multi-page Express app using Typescript and Bootstrap' });
9 | });
10 |
11 | export = router;
--------------------------------------------------------------------------------
/_old/step23_es2015_modules/src/routes/second.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
3 | import express = require('express');
4 | import User from '../models/User';
5 | var router = express.Router();
6 |
7 | var u: User = new User("Zia");
8 |
9 | /* GET second page. */
10 | router.get('/', function(req, res, next) {
11 | res.render('page2', { titleData: u.browsing() });
12 | });
13 |
14 | export = router;
--------------------------------------------------------------------------------
/_old/step23_es2015_modules/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES5",
4 | "module": "commonjs"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/_old/step23_es2015_modules/typings/tsd.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 | ///
4 | ///
5 | ///
6 | ///
7 |
--------------------------------------------------------------------------------
/_old/step23_es2015_modules/views/page2.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Express Page 2 using Typescript
6 |
7 |
8 |
9 |
10 | <%= titleData %>
11 | Back to main page
12 |
13 |
14 |
--------------------------------------------------------------------------------
/_old/step24_angular2/.gitignore:
--------------------------------------------------------------------------------
1 | .idea
2 | node_modules
3 | npm-debug
4 |
--------------------------------------------------------------------------------
/_old/step24_angular2/dist/client/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Angular 2 QuickStart
4 |
5 |
6 |
12 |
13 |
14 | Loading...
15 |
16 |
--------------------------------------------------------------------------------
/_old/step24_angular2/src/client/app/app.ts:
--------------------------------------------------------------------------------
1 | import {Component, bootstrap} from 'angular2/angular2';
2 | @Component({
3 | selector: 'my-app',
4 | template: 'Angular 2 App with Typed Node.js
'
5 | })
6 | class AppComponent { }
7 | bootstrap(AppComponent);
--------------------------------------------------------------------------------
/_old/step24_angular2/src/client/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Angular 2 QuickStart
4 |
5 |
6 |
12 |
13 |
14 | Loading...
15 |
16 |
--------------------------------------------------------------------------------
/_old/step24_angular2/src/client/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES5",
4 | "module": "commonjs",
5 | "sourceMap": true,
6 | "emitDecoratorMetadata": true,
7 | "experimentalDecorators": true,
8 | "removeComments": false,
9 | "noImplicitAny": false
10 | }
11 | }
--------------------------------------------------------------------------------
/_old/step24_angular2/src/server/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES5",
4 | "module": "commonjs"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/_old/step24_angular2/src/server/typings/tsd.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 | ///
4 | ///
5 |
--------------------------------------------------------------------------------
/_old/step24_angular2/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "module": "commonjs",
4 | "target": "es5"
5 | }
6 | }
--------------------------------------------------------------------------------
/_old/step24_angular2/typings/tsd.d.ts:
--------------------------------------------------------------------------------
1 |
2 | ///
3 | ///
4 | ///
5 | ///
6 | ///
7 | ///
8 | ///
9 |
--------------------------------------------------------------------------------
/_old/step25_angular2_sass/.gitignore:
--------------------------------------------------------------------------------
1 | .idea
2 | node_modules
3 | npm-debug
4 |
--------------------------------------------------------------------------------
/_old/step25_angular2_sass/dist/client/app/app.css:
--------------------------------------------------------------------------------
1 | h1 {
2 | background: #eeffcc; }
3 |
--------------------------------------------------------------------------------
/_old/step25_angular2_sass/dist/client/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Angular 2 QuickStart
4 |
5 |
6 |
12 |
13 |
14 | Loading...
15 |
16 |
--------------------------------------------------------------------------------
/_old/step25_angular2_sass/src/client/app/app.scss:
--------------------------------------------------------------------------------
1 | $primaryColor: #eeffcc;
2 |
3 | h1 {
4 | background: $primaryColor;
5 | }
--------------------------------------------------------------------------------
/_old/step25_angular2_sass/src/client/app/app.ts:
--------------------------------------------------------------------------------
1 | import {Component, bootstrap} from 'angular2/angular2';
2 | @Component({
3 | selector: 'my-app',
4 | template:`
5 | Typed and SASS Styled Angular 2 and Node.js Web App
6 | `,
7 | styleUrls: ['app/app.css']
8 | })
9 | class AppComponent { }
10 | bootstrap(AppComponent);
--------------------------------------------------------------------------------
/_old/step25_angular2_sass/src/client/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Angular 2 QuickStart
4 |
5 |
6 |
12 |
13 |
14 | Loading...
15 |
16 |
--------------------------------------------------------------------------------
/_old/step25_angular2_sass/src/client/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES5",
4 | "module": "commonjs",
5 | "sourceMap": true,
6 | "emitDecoratorMetadata": true,
7 | "experimentalDecorators": true,
8 | "removeComments": false,
9 | "noImplicitAny": false
10 | }
11 | }
--------------------------------------------------------------------------------
/_old/step25_angular2_sass/src/server/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES5",
4 | "module": "commonjs"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/_old/step25_angular2_sass/src/server/typings/tsd.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 | ///
4 | ///
5 |
--------------------------------------------------------------------------------
/_old/step25_angular2_sass/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "module": "commonjs",
4 | "target": "es5"
5 | }
6 | }
--------------------------------------------------------------------------------
/_old/step25_angular2_sass/typings/tsd.d.ts:
--------------------------------------------------------------------------------
1 |
2 | ///
3 | ///
4 | ///
5 | ///
6 | ///
7 | ///
8 | ///
9 | ///
10 |
--------------------------------------------------------------------------------
/_old/step26_angular2_sass_mocha/.gitignore:
--------------------------------------------------------------------------------
1 | .idea
2 | node_modules
3 | npm-debug
4 |
--------------------------------------------------------------------------------
/_old/step26_angular2_sass_mocha/dist/client/app/app.css:
--------------------------------------------------------------------------------
1 | h1 {
2 | background: #eeffcc; }
3 |
--------------------------------------------------------------------------------
/_old/step26_angular2_sass_mocha/dist/client/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Angular 2 QuickStart
4 |
5 |
6 |
12 |
13 |
14 | Loading...
15 |
16 |
--------------------------------------------------------------------------------
/_old/step26_angular2_sass_mocha/readme.md:
--------------------------------------------------------------------------------
1 | Read:
2 | http://dinozafirakos.com/2014/07/21/testing-with-mocha-chai-and-typescript/
3 | http://shellmonger.com/2015/09/29/testing-a-nodejs-library-with-mocha-and-chai/
4 | https://developmentnow.com/2015/02/05/make-your-node-js-api-bulletproof-how-to-test-with-mocha-chai-and-supertest/
5 |
6 | First install node modules:
7 | npm install
8 |
9 | To run Tests frist start the server:
10 | npm start
11 |
12 | then to run tests:
13 | npm test
--------------------------------------------------------------------------------
/_old/step26_angular2_sass_mocha/src/client/app/app.scss:
--------------------------------------------------------------------------------
1 | $primaryColor: #eeffcc;
2 |
3 | h1 {
4 | background: $primaryColor;
5 | }
--------------------------------------------------------------------------------
/_old/step26_angular2_sass_mocha/src/client/app/app.ts:
--------------------------------------------------------------------------------
1 | import {Component, bootstrap} from 'angular2/angular2';
2 |
3 | @Component({
4 | selector: 'my-app',
5 | template:`
6 | Typed and SASS Styled Angular 2 and Node.js Web App
7 | `,
8 | styleUrls: ['app/app.css']
9 | })
10 | class AppComponent { }
11 | bootstrap(AppComponent);
--------------------------------------------------------------------------------
/_old/step26_angular2_sass_mocha/src/client/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Angular 2 QuickStart
4 |
5 |
6 |
12 |
13 |
14 | Loading...
15 |
16 |
--------------------------------------------------------------------------------
/_old/step26_angular2_sass_mocha/src/client/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES5",
4 | "module": "commonjs",
5 | "sourceMap": true,
6 | "emitDecoratorMetadata": true,
7 | "experimentalDecorators": true,
8 | "removeComments": false,
9 | "noImplicitAny": false
10 | }
11 | }
--------------------------------------------------------------------------------
/_old/step26_angular2_sass_mocha/src/server/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES5",
4 | "module": "commonjs"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/_old/step26_angular2_sass_mocha/src/server/typings/tsd.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 | ///
4 | ///
5 |
--------------------------------------------------------------------------------
/_old/step26_angular2_sass_mocha/test/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "module": "commonjs",
4 | "target": "es5"
5 | }
6 | }
--------------------------------------------------------------------------------
/_old/step26_angular2_sass_mocha/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "module": "commonjs",
4 | "target": "es5"
5 | }
6 | }
--------------------------------------------------------------------------------
/_old/step26_angular2_sass_mocha/typings/gulp-mocha/gulp-mocha.d.ts:
--------------------------------------------------------------------------------
1 | // Type definitions for gulp-mocha
2 | // Project: https://github.com/sindresorhus/gulp-mocha
3 | // Definitions by: Asana
4 | // Definitions: https://github.com/borisyankov/DefinitelyTyped
5 |
6 | ///
7 | ///
8 |
9 | declare module "gulp-mocha" {
10 | function mocha(setupOptions?: MochaSetupOptions): NodeJS.ReadWriteStream;
11 | export = mocha;
12 | }
--------------------------------------------------------------------------------
/_old/step2_middlewares/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 |
--------------------------------------------------------------------------------
/_old/step2_middlewares/public/img/typescript.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/panacloud/learn-typed-express/abae539066747ea9a5afdd34ed137443ea1cb4cd/_old/step2_middlewares/public/img/typescript.png
--------------------------------------------------------------------------------
/_old/step2_middlewares/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES5",
4 | "module": "commonjs"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/_old/step2_middlewares/typings/tsd.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 | ///
4 | ///
5 | ///
6 |
--------------------------------------------------------------------------------
/_old/step2_middlewares/views/index.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Express using Typescript
6 |
7 |
8 |
9 |
10 | Hello Express using TypeScript
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/_old/step3_middlewares-multiple/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 |
--------------------------------------------------------------------------------
/_old/step3_middlewares-multiple/public/img/typescript.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/panacloud/learn-typed-express/abae539066747ea9a5afdd34ed137443ea1cb4cd/_old/step3_middlewares-multiple/public/img/typescript.png
--------------------------------------------------------------------------------
/_old/step3_middlewares-multiple/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES5",
4 | "module": "commonjs"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/_old/step3_middlewares-multiple/typings/tsd.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 | ///
4 | ///
5 | ///
6 |
--------------------------------------------------------------------------------
/_old/step3_middlewares-multiple/views/index.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Express using Typescript
6 |
7 |
8 |
9 |
10 | Hello Express using TypeScript
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/_old/step4_middlewares-error-handling/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 |
--------------------------------------------------------------------------------
/_old/step4_middlewares-error-handling/public/img/typescript.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/panacloud/learn-typed-express/abae539066747ea9a5afdd34ed137443ea1cb4cd/_old/step4_middlewares-error-handling/public/img/typescript.png
--------------------------------------------------------------------------------
/_old/step4_middlewares-error-handling/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES5",
4 | "module": "commonjs"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/_old/step4_middlewares-error-handling/typings/tsd.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 | ///
4 | ///
5 | ///
6 |
--------------------------------------------------------------------------------
/_old/step4_middlewares-error-handling/views/index.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Express using Typescript
6 |
7 |
8 |
9 |
10 | Hello Express using TypeScript
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/_old/step5_middlewares-mounting/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 |
--------------------------------------------------------------------------------
/_old/step5_middlewares-mounting/public/img/typescript.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/panacloud/learn-typed-express/abae539066747ea9a5afdd34ed137443ea1cb4cd/_old/step5_middlewares-mounting/public/img/typescript.png
--------------------------------------------------------------------------------
/_old/step5_middlewares-mounting/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES5",
4 | "module": "commonjs"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/_old/step5_middlewares-mounting/typings/tsd.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 | ///
4 | ///
5 | ///
6 |
--------------------------------------------------------------------------------
/_old/step5_middlewares-mounting/views/index.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Express using Typescript
6 |
7 |
8 |
9 |
10 | Hello Express using TypeScript
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/_old/step6_middlewares-routes/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 |
--------------------------------------------------------------------------------
/_old/step6_middlewares-routes/public/img/typescript.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/panacloud/learn-typed-express/abae539066747ea9a5afdd34ed137443ea1cb4cd/_old/step6_middlewares-routes/public/img/typescript.png
--------------------------------------------------------------------------------
/_old/step6_middlewares-routes/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES5",
4 | "module": "commonjs"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/_old/step6_middlewares-routes/typings/tsd.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 | ///
4 | ///
5 | ///
6 |
--------------------------------------------------------------------------------
/_old/step6_middlewares-routes/views/index.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Express using Typescript
6 |
7 |
8 |
9 |
10 | Hello Express using TypeScript
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/_old/step7_routing/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 |
--------------------------------------------------------------------------------
/_old/step7_routing/built/routes/index.js:
--------------------------------------------------------------------------------
1 | ///
2 | var express = require('express');
3 | var router = express.Router();
4 | /* GET home page. */
5 | router.get('/', function (req, res, next) {
6 | res.render('index', { title: 'Multi-page Express app using Typescript' });
7 | });
8 | module.exports = router;
9 |
--------------------------------------------------------------------------------
/_old/step7_routing/built/routes/second.js:
--------------------------------------------------------------------------------
1 | ///
2 | var express = require('express');
3 | var router = express.Router();
4 | /* GET second page. */
5 | router.get('/', function (req, res, next) {
6 | res.render('page2', { titleData: 'This is the second page' });
7 | });
8 | module.exports = router;
9 |
--------------------------------------------------------------------------------
/_old/step7_routing/public/img/typescript.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/panacloud/learn-typed-express/abae539066747ea9a5afdd34ed137443ea1cb4cd/_old/step7_routing/public/img/typescript.png
--------------------------------------------------------------------------------
/_old/step7_routing/readme.md:
--------------------------------------------------------------------------------
1 | Read:
2 | https://github.com/czechboy0/Express-4x-Typescript-Sample
--------------------------------------------------------------------------------
/_old/step7_routing/src/routes/index.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
3 | import express = require('express');
4 | var router = express.Router();
5 |
6 | /* GET home page. */
7 | router.get('/', function(req, res, next) {
8 | res.render('index', { title: 'Multi-page Express app using Typescript' });
9 | });
10 |
11 | export = router;
--------------------------------------------------------------------------------
/_old/step7_routing/src/routes/second.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
3 | import express = require('express');
4 | var router = express.Router();
5 |
6 | /* GET second page. */
7 | router.get('/', function(req, res, next) {
8 | res.render('page2', { titleData: 'This is the second page' });
9 | });
10 |
11 | export = router;
--------------------------------------------------------------------------------
/_old/step7_routing/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES5",
4 | "module": "commonjs"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/_old/step7_routing/typings/tsd.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 | ///
4 | ///
5 | ///
6 | ///
7 |
--------------------------------------------------------------------------------
/_old/step7_routing/views/index.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Express using Typescript
6 |
7 |
8 |
9 |
10 | <%= title %>
11 |
12 | Go to second page
13 |
14 |
--------------------------------------------------------------------------------
/_old/step7_routing/views/page2.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Express Page 2 using Typescript
6 |
7 |
8 |
9 |
10 | <%= titleData %>
11 | Back to main page
12 |
13 |
14 |
--------------------------------------------------------------------------------
/_old/step8_ejs/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 |
--------------------------------------------------------------------------------
/_old/step8_ejs/.vscode/tasks.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "0.1.0",
3 | "command": "gulp",
4 | "isShellCommand": true,
5 | "args": [
6 | "--no-color"
7 | ],
8 | "tasks": [
9 | {
10 | "taskName": "buildServer",
11 | "args": [],
12 | "isBuildCommand": true,
13 | "isWatching": false,
14 | "problemMatcher": [
15 | "$lessCompile",
16 | "$tsc",
17 | "$jshint"
18 | ]
19 | }
20 | ]
21 | }
--------------------------------------------------------------------------------
/_old/step8_ejs/public/img/typescript.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/panacloud/learn-typed-express/abae539066747ea9a5afdd34ed137443ea1cb4cd/_old/step8_ejs/public/img/typescript.png
--------------------------------------------------------------------------------
/_old/step8_ejs/readme.md:
--------------------------------------------------------------------------------
1 | # ejs:
2 | Embedded JavaScript templates
3 |
4 | - Control flow with <% %>
5 | - Escaped output with <%= %>
6 | - Unescaped raw output with <%- %>
7 | - Includes
8 |
9 | Usage:
10 |
11 | - <% 'Scriptlet' tag, for control-flow, no output
12 | - <%= Outputs the value into the template (HTML escaped)
13 | - <%- Outputs the unescaped value into the template
14 | - <%# Comment tag, no execution, no output
15 | - %> Plain ending tag
--------------------------------------------------------------------------------
/_old/step8_ejs/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES5",
4 | "module": "commonjs"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/_old/step8_ejs/typings/tsd.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 | ///
4 | ///
5 | ///
6 | ///
7 |
--------------------------------------------------------------------------------
/_old/step8_ejs/views/partial.ejs:
--------------------------------------------------------------------------------
1 |
2 |
Partial EJS to include
3 |
--------------------------------------------------------------------------------
/_old/step9_querystring/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 |
--------------------------------------------------------------------------------
/_old/step9_querystring/.vscode/tasks.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "0.1.0",
3 | "command": "gulp",
4 | "isShellCommand": true,
5 | "args": [
6 | "--no-color"
7 | ],
8 | "tasks": [
9 | {
10 | "taskName": "buildServer",
11 | "args": [],
12 | "isBuildCommand": true,
13 | "isWatching": false,
14 | "problemMatcher": [
15 | "$lessCompile",
16 | "$tsc",
17 | "$jshint"
18 | ]
19 | }
20 | ]
21 | }
--------------------------------------------------------------------------------
/_old/step9_querystring/public/img/typescript.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/panacloud/learn-typed-express/abae539066747ea9a5afdd34ed137443ea1cb4cd/_old/step9_querystring/public/img/typescript.png
--------------------------------------------------------------------------------
/_old/step9_querystring/readme.md:
--------------------------------------------------------------------------------
1 | # req.query:
2 | An object containing a property for each query string parameter in the route. If there is no query string, it is the empty object, {}.
3 |
4 | // GET /search?q=tobi+ferret
5 | req.query.q
6 | // => "tobi ferret"
7 |
8 | // GET /shoes?order=desc&shoe[color]=blue&shoe[type]=converse
9 | req.query.order
10 | // => "desc"
11 |
12 | req.query.shoe.color
13 | // => "blue"
14 |
15 | req.query.shoe.type
16 | // => "converse"
--------------------------------------------------------------------------------
/_old/step9_querystring/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES5",
4 | "module": "commonjs"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/_old/step9_querystring/typings/tsd.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 | ///
4 | ///
5 | ///
6 | ///
7 |
--------------------------------------------------------------------------------
/_old/step_test_spa/.gitignore:
--------------------------------------------------------------------------------
1 | .idea
2 | node_modules
3 | npm-debug
4 |
--------------------------------------------------------------------------------
/_old/step_test_spa/client/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Express using Typescript
6 |
7 |
8 |
9 |
10 | Hello Express using TypeScript
11 |
12 |
13 |
--------------------------------------------------------------------------------
/_old/step_test_spa/dist/client/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Express using Typescript
6 |
7 |
8 |
9 |
10 | Hello Express using TypeScript
11 |
12 |
13 |
--------------------------------------------------------------------------------
/_old/step_test_spa/readme.md:
--------------------------------------------------------------------------------
1 | Read:
2 | A flexiable structure that can be used with Angular 1.x, Aungular 2, and Firebase hosting as well.
--------------------------------------------------------------------------------
/_old/step_test_spa/server/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES5",
4 | "module": "commonjs"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/_old/step_test_spa/server/typings/tsd.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 | ///
4 | ///
5 |
--------------------------------------------------------------------------------
/_old/typed-express-in-action/.nvmrc:
--------------------------------------------------------------------------------
1 | v0.12
2 |
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_01/express_hello_world/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_01/express_hello_world/app.js:
--------------------------------------------------------------------------------
1 | ///
2 | var express = require("express");
3 | var app = express();
4 | app.get("/", function (request, response) {
5 | response.send("Hello world!");
6 | });
7 | app.listen(3000, function () {
8 | console.log("Express app started on port 3000.");
9 | });
10 |
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_01/express_hello_world/app.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
3 | import express = require("express");
4 |
5 | var app = express();
6 |
7 | app.get("/", (request : express.Request, response: express.Response) => {
8 | response.send("Hello world!");
9 | });
10 |
11 | app.listen(3000, () => {
12 | console.log("Express app started on port 3000.");
13 | });
14 |
15 |
16 |
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_01/express_hello_world/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "private": true,
3 | "scripts": {
4 | "start": "node app"
5 | },
6 | "dependencies": {
7 | "express": "^5.0.0-alpha.2"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_01/express_hello_world/readme.md:
--------------------------------------------------------------------------------
1 | Listing 1.1 “Hello World” in Express in TypeScript from the Book Express in Action:
2 |
3 | https://www.manning.com/books/express-in-action
4 |
5 |
6 | Express 5 Update:
7 | http://expressjs.com/guide/migrating-5.html
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_01/express_hello_world/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES5",
4 | "module": "commonjs"
5 | }
6 | }
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_01/express_hello_world/typings/tsd.d.ts:
--------------------------------------------------------------------------------
1 |
2 | ///
3 | ///
4 | ///
5 | ///
6 |
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_02/built_in_modules/app.js:
--------------------------------------------------------------------------------
1 | ///
2 | var url = require("url");
3 | var parsedURL = url.parse("http://www.example.com/profile?name=barry");
4 | console.log(parsedURL.protocol); // "http:"
5 | console.log(parsedURL.host); // "www.example.com"
6 | console.log(parsedURL.query); // "name=barry"
7 |
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_02/built_in_modules/app.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
3 | import url = require("url");
4 | var parsedURL = url.parse("http://www.example.com/profile?name=barry");
5 | console.log(parsedURL.protocol); // "http:"
6 | console.log(parsedURL.host); // "www.example.com"
7 | console.log(parsedURL.query);// "name=barry"
8 |
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_02/built_in_modules/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "private": true,
3 | "scripts": {
4 | "start": "node app"
5 | },
6 | "dependencies": {
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_02/built_in_modules/readme.md:
--------------------------------------------------------------------------------
1 | Listing 2.2 Requiring Node's URL module in TypeScript from the Book Express in Action:
2 |
3 | https://www.manning.com/books/express-in-action
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_02/built_in_modules/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES5",
4 | "module": "commonjs"
5 | }
6 | }
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_02/built_in_modules/tsd.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "v4",
3 | "repo": "borisyankov/DefinitelyTyped",
4 | "ref": "master",
5 | "path": "typings",
6 | "bundle": "typings/tsd.d.ts",
7 | "installed": {
8 | "node/node.d.ts": {
9 | "commit": "ac5cd185d007f6aacd6eeaaecfb75dae3ff59553"
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_02/built_in_modules/typings/tsd.d.ts:
--------------------------------------------------------------------------------
1 |
2 | ///
3 |
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_02/defining_modules_es2015/app.js:
--------------------------------------------------------------------------------
1 | ///
2 | var random_integer_1 = require("./random-integer");
3 | console.log(random_integer_1.randomInteger()); // 12
4 | console.log(random_integer_1.randomInteger()); // 77
5 | console.log(random_integer_1.randomInteger()); // 8
6 |
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_02/defining_modules_es2015/app.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
3 | import {randomInteger} from "./random-integer";
4 | console.log(randomInteger());
5 | console.log(randomInteger());
6 | console.log(randomInteger());
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_02/defining_modules_es2015/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "private": true,
3 | "scripts": {
4 | "start": "node app"
5 | },
6 | "dependencies": {
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_02/defining_modules_es2015/random-integer.js:
--------------------------------------------------------------------------------
1 | ///
2 | var MAX = 100;
3 | function randomInteger() {
4 | return Math.floor((Math.random() * MAX));
5 | }
6 | exports.randomInteger = randomInteger;
7 |
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_02/defining_modules_es2015/random-integer.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
3 | var MAX = 100;
4 | export function randomInteger() {
5 | return Math.floor((Math.random() * MAX));
6 | }
7 |
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_02/defining_modules_es2015/readme.md:
--------------------------------------------------------------------------------
1 | Listing 2.9 and 2.10 in TypeScript from the Book Express in Action:
2 |
3 | https://www.manning.com/books/express-in-action
4 |
5 | The TypeScript Version uses ES2015 (ES6) Module Syntax:
6 |
7 | http://www.2ality.com/2014/09/es6-modules-final.html
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_02/defining_modules_es2015/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES5",
4 | "module": "commonjs"
5 | }
6 | }
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_02/defining_modules_es2015/tsd.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "v4",
3 | "repo": "borisyankov/DefinitelyTyped",
4 | "ref": "master",
5 | "path": "typings",
6 | "bundle": "typings/tsd.d.ts",
7 | "installed": {
8 | "node/node.d.ts": {
9 | "commit": "ac5cd185d007f6aacd6eeaaecfb75dae3ff59553"
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_02/defining_modules_es2015/typings/tsd.d.ts:
--------------------------------------------------------------------------------
1 |
2 | ///
3 |
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_02/node_hello_world/app.js:
--------------------------------------------------------------------------------
1 | ///
2 | console.log("Hello World!");
3 |
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_02/node_hello_world/app.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
3 | console.log("Hello World!");
4 |
5 |
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_02/node_hello_world/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "private": true,
3 | "scripts": {
4 | "start": "node app"
5 | },
6 | "dependencies": {
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_02/node_hello_world/readme.md:
--------------------------------------------------------------------------------
1 | Express 5 Update:
2 | http://expressjs.com/guide/migrating-5.html
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_02/node_hello_world/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES5",
4 | "module": "commonjs"
5 | }
6 | }
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_02/node_hello_world/tsd.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "v4",
3 | "repo": "borisyankov/DefinitelyTyped",
4 | "ref": "master",
5 | "path": "typings",
6 | "bundle": "typings/tsd.d.ts",
7 | "installed": {
8 | "node/node.d.ts": {
9 | "commit": "ac5cd185d007f6aacd6eeaaecfb75dae3ff59553"
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_02/node_hello_world/typings/tsd.d.ts:
--------------------------------------------------------------------------------
1 |
2 | ///
3 |
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_02/node_webserver/app.js:
--------------------------------------------------------------------------------
1 | ///
2 | var http = require("http");
3 | function requestHandler(request, response) {
4 | console.log("In comes a request to: " + request.url);
5 | response.end("Hello, world!");
6 | }
7 | var server = http.createServer(requestHandler);
8 | server.listen(3000);
9 |
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_02/node_webserver/app.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
3 | import http = require("http");
4 | function requestHandler(request: http.IncomingMessage, response: http.ServerResponse) {
5 | console.log("In comes a request to: " + request.url);
6 | response.end("Hello, world!");
7 | }
8 | var server: http.Server = http.createServer(requestHandler);
9 | server.listen(3000);
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_02/node_webserver/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "private": true,
3 | "scripts": {
4 | "start": "node app"
5 | },
6 | "dependencies": {
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_02/node_webserver/readme.md:
--------------------------------------------------------------------------------
1 | Listing 2.13 A simple "hello world" web server with Node in TypeScript from the Book Express in Action:
2 |
3 | https://www.manning.com/books/express-in-action
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_02/node_webserver/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES5",
4 | "module": "commonjs"
5 | }
6 | }
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_02/node_webserver/tsd.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "v4",
3 | "repo": "borisyankov/DefinitelyTyped",
4 | "ref": "master",
5 | "path": "typings",
6 | "bundle": "typings/tsd.d.ts",
7 | "installed": {
8 | "node/node.d.ts": {
9 | "commit": "ac5cd185d007f6aacd6eeaaecfb75dae3ff59553"
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_02/node_webserver/typings/tsd.d.ts:
--------------------------------------------------------------------------------
1 |
2 | ///
3 |
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_02/node_webserver_routing/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "private": true,
3 | "scripts": {
4 | "start": "node app"
5 | },
6 | "dependencies": {
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_02/node_webserver_routing/readme.md:
--------------------------------------------------------------------------------
1 | Listing 2.14 Parsing the request URL with a request handler function in TypeScript from the Book Express in Action:
2 |
3 | https://www.manning.com/books/express-in-action
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_02/node_webserver_routing/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES5",
4 | "module": "commonjs"
5 | }
6 | }
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_02/node_webserver_routing/tsd.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "v4",
3 | "repo": "borisyankov/DefinitelyTyped",
4 | "ref": "master",
5 | "path": "typings",
6 | "bundle": "typings/tsd.d.ts",
7 | "installed": {
8 | "node/node.d.ts": {
9 | "commit": "ac5cd185d007f6aacd6eeaaecfb75dae3ff59553"
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_02/node_webserver_routing/typings/tsd.d.ts:
--------------------------------------------------------------------------------
1 |
2 | ///
3 |
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_02/reading_file_async/app.js:
--------------------------------------------------------------------------------
1 | ///
2 | var fs = require("fs");
3 | var options = { encoding: "utf-8" };
4 | fs.readFile("myfile.txt", options, function (err, data) {
5 | if (err) {
6 | console.error("Error reading file!");
7 | return;
8 | }
9 | console.log(data.match(/x/gi).length + " letter X's");
10 | });
11 | console.log("Hello world!");
12 |
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_02/reading_file_async/app.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
3 | import fs = require("fs");
4 | var options = { encoding: "utf-8" };
5 |
6 | fs.readFile("myfile.txt", options, (err: NodeJS.ErrnoException, data: string)=> {
7 | if (err) {
8 | console.error("Error reading file!");
9 | return;
10 | }
11 | console.log(data.match(/x/gi).length + " letter X's");
12 | });
13 |
14 | console.log("Hello world!");
15 |
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_02/reading_file_async/myfile.txt:
--------------------------------------------------------------------------------
1 | x = a + b;
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_02/reading_file_async/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "private": true,
3 | "scripts": {
4 | "start": "node app"
5 | },
6 | "dependencies": {
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_02/reading_file_async/readme.md:
--------------------------------------------------------------------------------
1 | Listing 2.11 and 2.12 in TypeScript from the Book Express in Action:
2 |
3 | https://www.manning.com/books/express-in-action
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_02/reading_file_async/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES5",
4 | "module": "commonjs"
5 | }
6 | }
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_02/reading_file_async/tsd.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "v4",
3 | "repo": "borisyankov/DefinitelyTyped",
4 | "ref": "master",
5 | "path": "typings",
6 | "bundle": "typings/tsd.d.ts",
7 | "installed": {
8 | "node/node.d.ts": {
9 | "commit": "ac5cd185d007f6aacd6eeaaecfb75dae3ff59553"
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_02/reading_file_async/typings/tsd.d.ts:
--------------------------------------------------------------------------------
1 |
2 | ///
3 |
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_02/third_party_modules/app.js:
--------------------------------------------------------------------------------
1 | ///
2 | var Mustache = require("mustache");
3 | var result = Mustache.render("Hi, {{first}} {{last}}!", {
4 | first: "Nicolas",
5 | last: "Cage"
6 | });
7 | console.log(result);
8 |
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_02/third_party_modules/app.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
3 | import Mustache = require("mustache");
4 | var result = Mustache.render("Hi, {{first}} {{last}}!", {
5 | first: "Nicolas",
6 | last: "Cage"
7 | });
8 | console.log(result);
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_02/third_party_modules/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "private": true,
3 | "scripts": {
4 | "start": "node app"
5 | },
6 | "dependencies": {
7 | "mustache": "^2.2.0"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_02/third_party_modules/readme.md:
--------------------------------------------------------------------------------
1 | Listing 2.7 Using the Mustache module in TypeScript from the Book Express in Action:
2 |
3 | https://www.manning.com/books/express-in-action
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_02/third_party_modules/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES5",
4 | "module": "commonjs"
5 | }
6 | }
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_02/third_party_modules/tsd.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "v4",
3 | "repo": "borisyankov/DefinitelyTyped",
4 | "ref": "master",
5 | "path": "typings",
6 | "bundle": "typings/tsd.d.ts",
7 | "installed": {
8 | "node/node.d.ts": {
9 | "commit": "ac5cd185d007f6aacd6eeaaecfb75dae3ff59553"
10 | },
11 | "mustache/mustache.d.ts": {
12 | "commit": "0dd29bf8253536ae24e61c109524e924ea510046"
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_02/third_party_modules/typings/tsd.d.ts:
--------------------------------------------------------------------------------
1 |
2 | ///
3 | ///
4 |
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_03/guestbook/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_03/guestbook/app.js:
--------------------------------------------------------------------------------
1 | ///
2 | console.log(require('url').parse('http://localhost:3000/1?p=2').pathname);
3 |
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_03/guestbook/app.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
3 | import url = require('url');
4 | console.log(require('url').parse('http://localhost:3000/1?p=2').pathname);
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_03/guestbook/converter.js:
--------------------------------------------------------------------------------
1 | ///
2 | var Converter1 = (function () {
3 | function Converter1() {
4 | }
5 | Converter1.setRate = function (rate) {
6 | Converter1.rate = rate;
7 | };
8 | Converter1.rupeeToDollar = function (rupee) {
9 | return rupee / Converter1.rate;
10 | };
11 | Converter1.rate = 100;
12 | return Converter1;
13 | })();
14 | exports.Converter1 = Converter1;
15 |
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_03/guestbook/converter.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
3 | export class Converter1{
4 | static rate = 100;
5 |
6 | static setRate(rate: number){
7 | Converter1.rate = rate;
8 | }
9 |
10 | static rupeeToDollar(rupee: number){
11 | return rupee / Converter1.rate;
12 | }
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_03/guestbook/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Hello World
8 |
9 |
10 |
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_03/guestbook/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "express-guestbook",
3 | "private": true,
4 | "scripts": {
5 | "start": "node app"
6 | },
7 | "dependencies": {
8 | "body-parser": "^1.13.2",
9 | "ejs": "^2.3.3",
10 | "express": "^5.0.0-alpha.2",
11 | "morgan": "^1.6.1"
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_03/guestbook/readme.md:
--------------------------------------------------------------------------------
1 | Listing 3.19 to 3.25 in TypeScript from the Book Express in Action:
2 |
3 | https://www.manning.com/books/express-in-action
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_03/guestbook/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES5",
4 | "module": "commonjs"
5 | }
6 | }
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_03/guestbook/typings/tsd.d.ts:
--------------------------------------------------------------------------------
1 |
2 | ///
3 | ///
4 | ///
5 | ///
6 | ///
7 | ///
8 |
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_03/guestbook/views/404.ejs:
--------------------------------------------------------------------------------
1 | <% include header %>
2 | 404! Page not found.
3 | <% include footer %>
--------------------------------------------------------------------------------
/_old/typed-express-in-action/Chapter_03/guestbook/views/footer.ejs:
--------------------------------------------------------------------------------
1 |