Back-end Frameworks
Back-end
executed on server
Front-end
executed on clinet (browser, mobile, tablet…)
Web server
software on the physical machine (hardware)
Node JS
- server side javascript
- interact with file (operating) systems
- FIFO
- time difference: 1sec ~ 28hours
- non-blocking === asynchronous Input/Output
- allows other operation on the other side
- delegate to someone something and do other stuff => higher efficiency
- multi-threads (JS: single-thread) : e.g. one looking for the answer / one doing help request
- allows to use the same language on client and server
Npm
- npm init
- initialise the packages
- package . json
- list all dependencies
- npm install / uninstall (–save-dev)
- npm publish
- create lib -> give authority as an open source
- weekly download counts
- last publish (updated) version
Async
Sync: fs 설정 시 다른 scope에서도 접근 가능하지만
Async: fs 안에서만 data 접근 가능, 밖 scope에서 접근 불가
HTTP
msg sending to client: “Hello World”
Modules
- Node.js: common js Module
- Module: object
- require: read exports and take object’s properties in it, assign to the variable which is reading the require, follow the execution in the file
- module.exports : what the file does/ passes
touch: create file
nodemon: watches the file, automatically restart (reload, update) the file