node Flashcards

1
Q

What is a web server?

A

A web server is a program that understands URLs and can read HTTP requests.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Describe the HTTP requests/response lifecycle.

A

The browser sends an http request to the web server.
Server handles the request based on the /path and http method in request
The handler function executes, possibly interacts with DB.
Response data is formatted, Response status set.
Response sent back to browser.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Tell me about a time when you’ve used Express Router. How was it helpful?

A

used for shower thoughts, helps to keep things organized mentally and also keep code organized

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is postgreSQL

A

an open source database management system

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

what is SQL

A

a querying languge used to interact with, manipulate a

relational database

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

what is knex

A

a SQL query builder used for postgres

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

what is the cors dependency?

A

an npm package to enable cors - cross origin resource sharing. sharing resources between different sites

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

what are environment variables? how can you use them?

A

environment variables are variables only accesible in certain environments and are stored in .env files. used for storing sensitive information securely

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

what is the dotenv dependency?

A

an npm module used for storing and reading .env files , environment variables

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

what is the helmet dependency?

A

the helmet npm module is used to hide information about the backend from potential malicious hackers by setting certain http headers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

endpoint logic

A

app.get(‘/route’, (req, res) => { logic, do something with req, res }

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

npm i pg

A

used with knex. knex can be used with different database management systems, the pg specifies that we’re using the postgres driver

How well did you know this?
1
Not at all
2
3
4
5
Perfectly