Git Product home page Git Product logo

nodejs-mongodb's Introduction

nodejs - mongodb

dan@ubun:~$ mongo MongoDB shell version: 2.4.9 connecting to: test Welcome to the MongoDB shell. For interactive help, type "help". For more comprehensive documentation, see http://docs.mongodb.org/ Questions? Try the support group http://groups.google.com/group/mongodb-user

use sampsite switched to db sampsite

db.students.insert([{"student" : "Dale Cooper", "street" : "123 main street", "city" : "Yakima", "state" : "WA", "sex" : "Male", "gpa" : 3.5 } ...]) Sun Feb 14 23:34:52.660 SyntaxError: Unexpected token .

db.students.insert([{"student" : "Dale Cooper", "street" : "123 main street", "city" : "Yakima", "state" : "WA", "sex" : "Male", "gpa" : 3.5 } ])

db.students.insert([{"student" : "Ping zhang", "street" : "654 walmart street", "city" : "Boston", "state" : "MA", "sex" : "Female", "gpa" : 5.5 } ])

db.students.insert([{"student" : "Dann Fang", "street" : "333 walmart street", "city" : "worcester", "state" : "MA", "sex" : "Male", "gpa" : 4.5 } ])

db.students.find().pretty() { "_id" : ObjectId("56c15577176bc98ab416d34c"), "student" : "Dale Cooper", "street" : "123 main street", "city" : "Yakima", "state" : "WA", "sex" : "Male", "gpa" : 3.5 } { "_id" : ObjectId("56c155aa176bc98ab416d34d"), "student" : "Ping zhang", "street" : "654 walmart street", "city" : "Boston", "state" : "MA", "sex" : "Female", "gpa" : 5.5 } { "_id" : ObjectId("56c155d1176bc98ab416d34e"), "student" : "Dann Fang", "street" : "333 walmart street", "city" : "worcester", "state" : "MA", "sex" : "Male", "gpa" : 4.5 }

dan@ubun:~/sampsite$ npm start

[email protected] start /home/dan/sampsite node ./bin/www

dan@ubun:~/sampsite$ mongod --dbpath /home/dan/sampsite/data --smallfiles Sun Feb 14 23:28:05.561 [initandlisten] MongoDB starting : pid=4061 port=27017 dbpath=/home/dan/sampsite/data 64-bit host=ubun Sun Feb 14 23:28:05.562 [initandlisten] db version v2.4.9 Sun Feb 14 23:28:05.562 [initandlisten] git version: nogitversion Sun Feb 14 23:28:05.562 [initandlisten] build info: Linux orlo 3.2.0-58-generic #88-Ubuntu SMP Tue Dec 3 17:37:58 UTC 2013 x86_64 BOOST_LIB_VERSION=1_54 Sun Feb 14 23:28:05.562 [initandlisten] allocator: tcmalloc Sun Feb 14 23:28:05.562 [initandlisten] options: { dbpath: "/home/dan/sampsite/data", smallfiles: true } Sun Feb 14 23:28:05.574 [initandlisten] journal dir=/home/dan/sampsite/data/journal Sun Feb 14 23:28:05.574 [initandlisten] recover : no journal files present, no recovery needed

if git push has access rights error,

use: git remote add origin https://github.com/rbmiao/nodejs-mongo

dan@ubun:~/sampsite$ git push -u origin master Username for 'https://github.com': rbmiao Password for 'https://[email protected]':

then: git push -u origin master

http://192.168.1.17:3000/thelist http://192.168.1.17:3000/newstudent

nodejs-mongodb's People

Contributors

rbmiao avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.