Engineering Tools for AI

程式設計

網路主要術語

整理本機開發、瀏覽器請求、API、Docker 與部署疑難排解中常見的網路術語。

42 個項目

位址與名稱

IP address

IP address

192.168.1.25

意思

A numeric address used to find a device on a network.

使用時機

Use it when another device needs to reach your computer, server, or container host.

範例

192.168.1.25

請求範例

Explain which IP address I should use from another device.

位址與名稱

IPv4

IPv4

192.168.0.10

意思

The common four-part IP address format.

使用時機

Most local network examples use IPv4 addresses such as 192.168.x.x or 10.x.x.x.

範例

192.168.0.10

請求範例

Tell me whether this address is an IPv4 local network address.

位址與名稱

IPv6

IPv6

::1

意思

A newer, longer IP address format designed to provide many more addresses.

使用時機

You may see IPv6 in logs, localhost bindings, or server network output.

範例

::1

請求範例

Explain whether this log is using IPv4 or IPv6.

位址與名稱

localhost

localhost

http://localhost:3000

意思

A name that means the same machine where the code or browser is running.

使用時機

Use it from the same computer that runs the development server.

注意

On a phone, localhost means the phone itself, not your development computer.

範例

http://localhost:3000

請求範例

Explain why localhost works on my computer but not on my phone.

位址與名稱

127.0.0.1

127.0.0.1

http://127.0.0.1:3000

意思

The common IPv4 loopback address for the current machine.

使用時機

Use it as a numeric alternative to localhost.

範例

http://127.0.0.1:3000

請求範例

Explain whether localhost and 127.0.0.1 are equivalent here.

位址與名稱

0.0.0.0

0.0.0.0

next dev -H 0.0.0.0

意思

An address used by servers to listen on all available network interfaces.

使用時機

Use it when another device on the same network needs to reach your dev server.

注意

It can expose a development server more broadly than localhost.

範例

next dev -H 0.0.0.0

請求範例

Explain whether this dev server should bind to 0.0.0.0.

位址與名稱

Hostname

Hostname

my-laptop.local

意思

A readable name for a device or server.

使用時機

Use it when a network name is easier to remember than an IP address.

範例

my-laptop.local

請求範例

Explain whether this hostname resolves to the expected IP.

位址與名稱

Domain

Domain

example.com

意思

A human-readable internet name for a website or service.

使用時機

Use domains for public sites instead of asking users to remember server IP addresses.

範例

example.com

請求範例

Explain what domain this deployed site should use.

位址與名稱

DNS

DNS

example.com -> 93.184.216.34

意思

The system that translates domain names into IP addresses.

使用時機

Use DNS records when connecting a domain to a hosting service or server.

範例

example.com -> 93.184.216.34

請求範例

Explain which DNS record is needed for this domain.

Port 與連線

Port

Port

3000

意思

A number that identifies which app or service receives traffic on a machine.

使用時機

Development servers often use ports such as 3000, 3001, 5173, or 8000.

範例

3000

請求範例

Tell me which port this server is using.

Port 與連線

Listen

Listen

Ready on http://localhost:3000

意思

A server is listening when it is ready to accept requests on an address and port.

使用時機

Check listening output to know which URL can be opened in the browser.

範例

Ready on http://localhost:3000

請求範例

Explain where this server is listening.

Port 與連線

Port forwarding

Port forwarding

8080 -> 3000

意思

Forwarding traffic from one port or machine to another port or machine.

使用時機

Use it in routers, tunnels, containers, and remote development environments.

範例

8080 -> 3000

請求範例

Explain where this port is forwarded.

Port 與連線

Firewall

Firewall

Allow incoming connections on port 3000

意思

A rule system that allows or blocks network traffic.

使用時機

Check it when a server runs locally but another device cannot connect.

範例

Allow incoming connections on port 3000

請求範例

Explain whether a firewall could block this local connection.

Web 請求

URL

URL

https://example.com/docs?page=1

意思

The full address used to request a web resource.

使用時機

A URL includes protocol, host, optional port, path, query string, and sometimes a fragment.

範例

https://example.com/docs?page=1

請求範例

Break this URL into protocol, host, port, path, and query.

Web 請求

Path

Path

/ko/reference/docker

意思

The part of a URL that identifies a route or resource on the server.

使用時機

Use it to understand which page or API endpoint is being requested.

範例

/ko/reference/docker

請求範例

Tell me which app route this URL path maps to.

Web 請求

Query string

Query string

?page=1&lang=ko

意思

The part of a URL after ? that passes extra parameters.

使用時機

Use it for filters, page numbers, search terms, and lightweight options.

範例

?page=1&lang=ko

請求範例

Explain what query parameters this URL sends.

Web 請求

HTTP

HTTP

http://localhost:3000

意思

The basic protocol browsers and servers use for web requests and responses.

使用時機

Local development often uses HTTP before production HTTPS is configured.

範例

http://localhost:3000

請求範例

Explain whether this local URL uses HTTP or HTTPS.

Web 請求

HTTPS

HTTPS

https://example.com

意思

HTTP protected by TLS encryption.

使用時機

Use HTTPS for public sites, login, cookies, payments, APIs, and production traffic.

範例

https://example.com

請求範例

Explain whether this deployed site needs HTTPS.

Web 請求

HTTP method

HTTP method

GET /api/tools

意思

A verb that tells the server what kind of action the request wants.

使用時機

GET usually reads data, while POST usually creates or submits data.

範例

GET /api/tools

請求範例

Explain which HTTP method this API request should use.

Web 請求

Status code

Status code

200 OK / 404 Not Found / 500 Internal Server Error

意思

A number that summarizes the result of an HTTP response.

使用時機

Use it to quickly separate success, redirect, client error, and server error responses.

範例

200 OK / 404 Not Found / 500 Internal Server Error

請求範例

Explain what this HTTP status code means.

Web 請求

Header

Header

Content-Type: application/json

意思

Metadata sent with an HTTP request or response.

使用時機

Headers carry content type, authorization, cookies, cache rules, and CORS settings.

範例

Content-Type: application/json

請求範例

Explain the important headers in this response.

Web 請求

Body

Body

{"name":"demo"}

意思

The main data content sent in an HTTP request or response.

使用時機

POST and PUT requests often send JSON data in the body.

範例

{"name":"demo"}

請求範例

Explain what data this request body sends.

瀏覽器安全

Origin

Origin

http://192.168.1.25:3000

意思

The combination of protocol, host, and port.

使用時機

Use origin to reason about CORS, cookies, and browser security rules.

注意

Changing only the port creates a different origin.

範例

http://192.168.1.25:3000

請求範例

Identify the origin of this URL.

瀏覽器安全

Same-origin policy

Same-origin policy

https://app.example.com cannot freely read https://api.example.com

意思

A browser rule that restricts how pages can read data from other origins.

使用時機

Use it to understand why browser API requests can fail even when the server is reachable.

範例

https://app.example.com cannot freely read https://api.example.com

請求範例

Explain whether this is a same-origin policy problem.

瀏覽器安全

CORS

CORS

Access-Control-Allow-Origin: https://app.example.com

意思

A server-side permission system that lets browsers use responses from another origin.

使用時機

Use it when a frontend app calls an API hosted on a different origin.

注意

CORS must be allowed by the server that sends the response.

範例

Access-Control-Allow-Origin: https://app.example.com

請求範例

Tell me whether this CORS error should be fixed in frontend code or server settings.

瀏覽器安全

Cookie

Cookie

Set-Cookie: session=abc; HttpOnly

意思

Small data stored by the browser and sent back to matching sites.

使用時機

Cookies are often used for sessions, preferences, and authentication state.

範例

Set-Cookie: session=abc; HttpOnly

請求範例

Explain whether this login state is stored in a cookie.

瀏覽器安全

Session

Session

session_id=abc123

意思

A way to remember user state across multiple requests.

使用時機

Use sessions to maintain login state or temporary server-side user data.

範例

session_id=abc123

請求範例

Explain how this app keeps the user session.

瀏覽器安全

Token

Token

Authorization: Bearer <token>

意思

A string used to prove identity or permission.

使用時機

Use tokens for API authentication, temporary access, and service-to-service requests.

注意

Tokens can grant access, so they should not be exposed in public code or logs.

範例

Authorization: Bearer <token>

請求範例

Check whether this token is being exposed to the browser.

瀏覽器安全

TLS certificate

TLS certificate

Let's Encrypt certificate

意思

A certificate used by HTTPS to prove a site's identity and encrypt traffic.

使用時機

Use it when serving a production site over HTTPS.

範例

Let's Encrypt certificate

請求範例

Explain why this browser says the certificate is invalid.

本機開發

Local network

Local network

Laptop and phone on the same Wi-Fi

意思

A private network where nearby devices can communicate, such as the same Wi-Fi.

使用時機

Use it when testing a local dev server from a phone or tablet.

範例

Laptop and phone on the same Wi-Fi

請求範例

Explain whether these devices are on the same local network.

本機開發

LAN IP

LAN IP

192.168.1.25

意思

An IP address used inside a local network.

使用時機

Use it from another device on the same network to reach your development machine.

範例

192.168.1.25

請求範例

Tell me the difference between localhost and a LAN IP.

本機開發

Network URL

Network URL

http://192.168.1.25:3000

意思

A URL that another device on the same network can use to reach a local server.

使用時機

Use it when testing a responsive page on a phone or tablet.

注意

The dev server may also need to listen on 0.0.0.0 and allow the origin.

範例

http://192.168.1.25:3000

請求範例

Explain how to open this dev server from a phone.

本機開發

Dev server

Dev server

npm run dev

意思

A local server used while developing and testing an app.

使用時機

Use it for fast reloads, local previews, and debugging before production build.

範例

npm run dev

請求範例

Explain which local URL and network URL this dev server exposes.

本機開發

HMR

HMR

/_next/webpack-hmr

意思

A development feature that updates the browser when code changes.

使用時機

Use it to keep the browser state while editing UI code.

範例

/_next/webpack-hmr

請求範例

Explain whether this blocked request is related to HMR.

伺服器與 Docker

Proxy

Proxy

Browser -> proxy -> API

意思

A server that sends requests on behalf of a client.

使用時機

Use it to route requests, hide backend details, or avoid direct browser-to-API calls in development.

範例

Browser -> proxy -> API

請求範例

Explain whether this API request goes through a proxy.

伺服器與 Docker

Reverse proxy

Reverse proxy

Nginx -> app:3000

意思

A server that receives public traffic and forwards it to internal services.

使用時機

Use it for HTTPS termination, routing, compression, caching, and forwarding to app servers.

範例

Nginx -> app:3000

請求範例

Explain how this reverse proxy routes traffic to the app.

伺服器與 Docker

Docker port mapping

Docker port mapping

3000:3000

意思

A mapping from a host port to a container port.

使用時機

Use it so a browser on the host can reach a web app running inside a container.

注意

In Docker ports, the left side is the host port and the right side is the container port.

範例

3000:3000

請求範例

Explain the browser URL for this Docker port mapping.

伺服器與 Docker

host.docker.internal

host.docker.internal

http://host.docker.internal:3000

意思

A special hostname containers can use to reach the host machine in many Docker Desktop setups.

使用時機

Use it when a container must call a service running on the host machine.

範例

http://host.docker.internal:3000

請求範例

Explain whether this container should use host.docker.internal.

伺服器與 Docker

Service name

Service name

postgres://db:5432/app

意思

In Docker Compose, services can often reach each other by service name.

使用時機

Use db, api, redis, or other compose service names instead of localhost between containers.

範例

postgres://db:5432/app

請求範例

Explain why this container should use the db service name instead of localhost.

伺服器與 Docker

Load balancer

Load balancer

Client -> load balancer -> app servers

意思

A system that distributes incoming traffic across multiple servers.

使用時機

Use it when one app has multiple running instances for scale or reliability.

範例

Client -> load balancer -> app servers

請求範例

Explain where a load balancer fits in this deployment.

伺服器與 Docker

CDN

CDN

Static assets served from an edge cache

意思

A distributed network that serves content from locations closer to users.

使用時機

Use it to speed up static assets, images, scripts, styles, and cached pages.

範例

Static assets served from an edge cache

請求範例

Explain whether this static site benefits from a CDN.

伺服器與 Docker

Cache

Cache

Cache-Control: max-age=3600

意思

Saved data or responses reused to make future requests faster.

使用時機

Use cache for static files, API responses, pages, and CDN edge content.

注意

Old cached content can make a fixed bug appear unfixed.

範例

Cache-Control: max-age=3600

請求範例

Explain whether this issue could be caused by cache.