Example code app.post("/register", (req, res) => { User.findOne({username: req.body.username}, async(err, doc) => { if(err) throw err; if(doc) res.send('User already exist'); if(!doc){ const hashedPassword = await bcrypt.hash(req.body.password, 10); const newUser = new User({ username: req.body.username, password: hashedPassword, }); await newUser.save(); res.send('User Created') } }) }) bcrypt ..
What is a module A module is an essential single unit of building a complete program. If your code doesn't have modules, it would be difficult to read and run. How to use module in Node.js? module.exports is used to return an object from the current module when other modules or programs require it. To import module, require keyword is used. Example Code //module.exports returns the result of req..
- Total
- Today
- Yesterday
- Javascript Algorithm
- javascript
- hackerrank
- code refactoring
- Collection Framework
- rest parameter
- compareTo()
- 프로그래머스 알고리즘문제
- easy algorithm
- hackerrank solution
- 알고리즘
- HashMap
- algorithm
- easy javascript algorithm
- equals()
- substring()
- HackerRank Algorithm
- 프로그래머스
- java
- C++
- string class in java
- math.max
- ... in Javascript
- repeat()
- hackerrank javascript solution
- math.abs
- spring boot application
- hackerrank javascript
- Object type casting
- 프로그래머스 알고리즘
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 |