homework presentation rapid web development with mongodb and node.js
TRANSCRIPT
![Page 1: Homework presentation Rapid Web Development with MongoDB and Node.js](https://reader030.vdocument.in/reader030/viewer/2022032816/620611dc8c2f7b173004573c/html5/thumbnails/1.jpg)
Homework presentationRapid Web Development with MongoDB and
Node.jsThe Bioinformatics Lab SS 2013 - Wiki topic 12
Tikira Temu
18. June 2013
![Page 2: Homework presentation Rapid Web Development with MongoDB and Node.js](https://reader030.vdocument.in/reader030/viewer/2022032816/620611dc8c2f7b173004573c/html5/thumbnails/2.jpg)
Programming challenge
Mongodb
install MongoDB
command linesudo apt-get install mongodb
Get familiar with the shell (Tutorial [1])Add two documents to the collection ’students’
mongoDB shellmanu= name: ’manuel’, age: 24, courses: [’programming’, ’math’]tiki= name: ’tikira’, age: 25, courses: [’informatics’, ’neuroscience’]use biolabdb.students.insert(manu)db.students.insert(tiki)
Tikira Temu Rapid Web Development with MongoDB and Node.js 2
![Page 3: Homework presentation Rapid Web Development with MongoDB and Node.js](https://reader030.vdocument.in/reader030/viewer/2022032816/620611dc8c2f7b173004573c/html5/thumbnails/3.jpg)
Programming challenge
NodeJS
install NodeJScommand linesudo apt-get install python g++ make checkinstallmkdir /src && cd $_wget -N http://nodejs.org/dist/node-latest.tar.gztar xzvf node-latest.tar.gz && cd node-v*./configurecheckinstall #(remove the "v" in front of the version number)sudo dpkg -i node_*
Tikira Temu Rapid Web Development with MongoDB and Node.js 3
![Page 4: Homework presentation Rapid Web Development with MongoDB and Node.js](https://reader030.vdocument.in/reader030/viewer/2022032816/620611dc8c2f7b173004573c/html5/thumbnails/4.jpg)
Programming challenge
Install the modules express and mongoose
install modulescommand linesudo npm install expresssudo npm install mongoose
check installations
Tikira Temu Rapid Web Development with MongoDB and Node.js 4
![Page 5: Homework presentation Rapid Web Development with MongoDB and Node.js](https://reader030.vdocument.in/reader030/viewer/2022032816/620611dc8c2f7b173004573c/html5/thumbnails/5.jpg)
Programming challenge
Define a mongoose model
Tikira Temu Rapid Web Development with MongoDB and Node.js 5
![Page 6: Homework presentation Rapid Web Development with MongoDB and Node.js](https://reader030.vdocument.in/reader030/viewer/2022032816/620611dc8c2f7b173004573c/html5/thumbnails/6.jpg)
Programming challenge
Define a mongoose model
Tikira Temu Rapid Web Development with MongoDB and Node.js 6
![Page 7: Homework presentation Rapid Web Development with MongoDB and Node.js](https://reader030.vdocument.in/reader030/viewer/2022032816/620611dc8c2f7b173004573c/html5/thumbnails/7.jpg)
Programming challenge
Create event bindings with express for the urls
Tikira Temu Rapid Web Development with MongoDB and Node.js 7
![Page 8: Homework presentation Rapid Web Development with MongoDB and Node.js](https://reader030.vdocument.in/reader030/viewer/2022032816/620611dc8c2f7b173004573c/html5/thumbnails/8.jpg)
Programming challenge
Create event bindings with express for the urls
Tikira Temu Rapid Web Development with MongoDB and Node.js 8
![Page 9: Homework presentation Rapid Web Development with MongoDB and Node.js](https://reader030.vdocument.in/reader030/viewer/2022032816/620611dc8c2f7b173004573c/html5/thumbnails/9.jpg)
Programming challenge
GET /list
Tikira Temu Rapid Web Development with MongoDB and Node.js 9
![Page 10: Homework presentation Rapid Web Development with MongoDB and Node.js](https://reader030.vdocument.in/reader030/viewer/2022032816/620611dc8c2f7b173004573c/html5/thumbnails/10.jpg)
Programming challenge
GET /:id
Tikira Temu Rapid Web Development with MongoDB and Node.js 10
![Page 11: Homework presentation Rapid Web Development with MongoDB and Node.js](https://reader030.vdocument.in/reader030/viewer/2022032816/620611dc8c2f7b173004573c/html5/thumbnails/11.jpg)
Programming challenge
GET /:id/xml
Tikira Temu Rapid Web Development with MongoDB and Node.js 11
![Page 12: Homework presentation Rapid Web Development with MongoDB and Node.js](https://reader030.vdocument.in/reader030/viewer/2022032816/620611dc8c2f7b173004573c/html5/thumbnails/12.jpg)
Programming challenge
GET /:id/xml
Tikira Temu Rapid Web Development with MongoDB and Node.js 12
![Page 13: Homework presentation Rapid Web Development with MongoDB and Node.js](https://reader030.vdocument.in/reader030/viewer/2022032816/620611dc8c2f7b173004573c/html5/thumbnails/13.jpg)
Programming challenge
GET /:id/xml
Command line (module installation)sudo npm install jsontoxml
Tikira Temu Rapid Web Development with MongoDB and Node.js 13
![Page 14: Homework presentation Rapid Web Development with MongoDB and Node.js](https://reader030.vdocument.in/reader030/viewer/2022032816/620611dc8c2f7b173004573c/html5/thumbnails/14.jpg)
Programming challenge
GET /:id/edit
Tikira Temu Rapid Web Development with MongoDB and Node.js 14
![Page 15: Homework presentation Rapid Web Development with MongoDB and Node.js](https://reader030.vdocument.in/reader030/viewer/2022032816/620611dc8c2f7b173004573c/html5/thumbnails/15.jpg)
Programming challenge
GET /:id/edit
Tikira Temu Rapid Web Development with MongoDB and Node.js 15
![Page 16: Homework presentation Rapid Web Development with MongoDB and Node.js](https://reader030.vdocument.in/reader030/viewer/2022032816/620611dc8c2f7b173004573c/html5/thumbnails/16.jpg)
Programming challenge
GET /add
Tikira Temu Rapid Web Development with MongoDB and Node.js 16
![Page 17: Homework presentation Rapid Web Development with MongoDB and Node.js](https://reader030.vdocument.in/reader030/viewer/2022032816/620611dc8c2f7b173004573c/html5/thumbnails/17.jpg)
Programming challenge
GET /add
Tikira Temu Rapid Web Development with MongoDB and Node.js 17
![Page 18: Homework presentation Rapid Web Development with MongoDB and Node.js](https://reader030.vdocument.in/reader030/viewer/2022032816/620611dc8c2f7b173004573c/html5/thumbnails/18.jpg)
Programming challenge
GET /db
Tikira Temu Rapid Web Development with MongoDB and Node.js 18
![Page 19: Homework presentation Rapid Web Development with MongoDB and Node.js](https://reader030.vdocument.in/reader030/viewer/2022032816/620611dc8c2f7b173004573c/html5/thumbnails/19.jpg)
Programming challenge
GET /db
Command line (module installation)sudo npm install [email protected]
Tikira Temu Rapid Web Development with MongoDB and Node.js 19
![Page 20: Homework presentation Rapid Web Development with MongoDB and Node.js](https://reader030.vdocument.in/reader030/viewer/2022032816/620611dc8c2f7b173004573c/html5/thumbnails/20.jpg)
Programming challenge
Add a field visitors in the Student model and count eachtime the /:id page of a student is requested
Tikira Temu Rapid Web Development with MongoDB and Node.js 20
![Page 21: Homework presentation Rapid Web Development with MongoDB and Node.js](https://reader030.vdocument.in/reader030/viewer/2022032816/620611dc8c2f7b173004573c/html5/thumbnails/21.jpg)
Programming challenge
References
[1] MongoDB Tutorial[2] jsontoxml[3] module: jstoxml[4] module: felixge / node-mysql
Tikira Temu Rapid Web Development with MongoDB and Node.js 21
![Page 22: Homework presentation Rapid Web Development with MongoDB and Node.js](https://reader030.vdocument.in/reader030/viewer/2022032816/620611dc8c2f7b173004573c/html5/thumbnails/22.jpg)
Programming challenge
for your attention!
Tikira Temu Rapid Web Development with MongoDB and Node.js 22