Node Flashcards
npm -commands should always be run in the project r.._ directory
npm -commands should always be run in the project root directory
when we want to save something as a development dependency, we need to remember the –save-d._ flag
when we want to save something as a development dependency, we need to remember the –save-dev flag
you have already used nodemon, but ts-node has an alternative called ts-node-d._
you have already used nodemon, but ts-node has an alternative called ts-node-dev
All HTTP requests except POST should be id____tent
(This means that if a request does not generate side effects, then the result should be the same regardless of how many times the request is sent.)
All HTTP requests except POST should be idempotent:
Methods can also have the property of “idempotence” in that (aside from error or expiration issues) the side-effects of N > 0 identical requests is the same as for a single request. The methods GET, HEAD, PUT and DELETE share this property
This means that if a request does not generate side effects, then the result should be the same regardless of how many times the request is sent.
Deployment p______ means an automated and controlled way to move the code from the computer of the developer through different tests and quality checks to the production environment.
Deployment pipeline means an automated and controlled way to move the code from the computer of the developer through different tests and quality checks to the production environment.
Dotenv is a zero-dependency module that loads environment variables from a .env file into p______.env.
Dotenv is a zero-dependency module that loads environment variables from a .env file into process.env
The .env file should be ________-ed right away since we do not want to publish any confidential information publicly online!
The .env file should be gitignored right away since we do not want to publish any confidential information publicly online!
The environment variables defined in the .env file can be taken into use with the expression require(‘dotenv’)._____()
The environment variables defined in the .env file can be taken into use with the expression require(‘dotenv’).config()
The execution order of middleware is the same as the order that they are loaded into Express with the app.___ function. For this reason, it is important to be careful when defining middleware.
The execution order of middleware is the same as the order that they are loaded into Express with the app.use function. For this reason, it is important to be careful when defining middleware.
app.use(express.static(‘dist’))
app.use(express.json())
app.use(requestLogger)
import cors from “____”
const app = express();
app.use(cors___)
import cors from “cors”
const app = express();
app.use(cors( ))