NodeJS - goatandsheep/goatandsheep.github.com GitHub Wiki
- Asynchronous
- Single-threaded
Basically it creates tasks and when it's not busy waiting for response requests and stuff it does other things in the queue.
Node Package Manager helps the community work together to build components of code to reduce the amount of time needed to get a project running.
npm config get prefix
- Move result to Environment Variables > Path with a semicolon
- Install all the packages in your directory:
npm init
- Run:
node app.js
- Install:
npm install <package> --save
This isn't always bad but sometimes it causes errors. When errors come up that are caused by circular dependencies, first use eslint-plugin-import library
in your eslint config add:
{
"extends": [
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript",
],
"rules": {
"import/no-cycle": ["error",
{
"maxDepth": 10,
"ignoreExternal": true
}],
"import/no-unresolved": "error",
},
"settings": {
"import/extensions": [".js", ".jsx", ".ts", ".tsx"],
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"]
}
},
}