Module
Node wraps you code with function expression & invokes it, this function expression has these argument: exports, module, __dirname & __filename .Now you have access to these argument within your code. You can use these argument e.g module.exports = hello() to expose ur moduleExpress
route handle is a middleware. request-processing-pipeline: Req - Request processing pipeline |
Built - in modules (mostly used)
set environment vars: export PORT = 3000 ewwee
www
Debugging
Two names are will create:- app:db & app:start . You can replace console.log with dbDebugger or startDebugger . Define console output:- export DEBUG=app:start orexport DEBUG=app:db or export DEBUG=app:start,app:db orexport DEBUG=app:* |
NPM
|
Cheatography
https://cheatography.com
Nodejs Cheat Sheet Cheat Sheet (DRAFT) by digotetso
Everything about node
This is a draft cheat sheet. It is a work in progress and is not finished yet.