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
- spring boot application
- easy javascript algorithm
- 프로그래머스
- ... in Javascript
- hackerrank javascript
- algorithm
- HackerRank Algorithm
- HashMap
- C++
- easy algorithm
- string class in java
- repeat()
- rest parameter
- hackerrank
- equals()
- 프로그래머스 알고리즘문제
- hackerrank javascript solution
- code refactoring
- compareTo()
- 알고리즘
- javascript
- Javascript Algorithm
- java
- substring()
- math.max
- math.abs
- 프로그래머스 알고리즘
- Collection Framework
- hackerrank solution
- 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 |