Skip to content

hcmminer/nodeauth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

user-login-system

nodejs by building 12 project

use mongodb

  • install mongodb C:\mongodb // nên cài vào đây
  • cd C:\mongodb\bin>

  • mongo

  • db // đang ở db nào

  • show dbs // chưa có gì ngoài các db mặc định

  • use customers // chuyển sang db nếu chưa có thì tạo mới

  • db.createCollection('customers') // sau khi tạo một collection thì mới show dbs được

  • show collections // hiện các colection trong db hiện tại

  • db.createCollection('users')

  • db.users.insert({name: 'dang van ban', email: '[email protected]', password: '1234'});

  • db.users.find()

  • db.users.find().pretty() // xem đẹp hơn

  • db.users.update({username: 'hcmminer'},{$set: {email: '[email protected]'}}) // nếu không có $set thì mọi thứ khác sẽ bị xóa rất nguy hiểm

  • db.users.remove({name: 'dang van ban'})

express

  • npm install -g express // global express

  • npm install -g express-generator

  • express // create a template of express folders

About

nodejs by building 12 project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors