Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion _data/pt-br/footer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ coc: Código de Conduta
trademark_policy: Política de Marcas
security_policy: Política de Segurança
license: Licença
trademark_legal: Copyright <a href='https://openjsf.org'>OpenJS Foundation</a> and Express contributors. All rights reserved. The <a href='https://openjsf.org'>OpenJS Foundation</a> has registered trademarks and uses trademarks. For a list of trademarks of the <a href='https://openjsf.org'>OpenJS Foundation</a>, please see our <a href='https://trademark-policy.openjsf.org'>Trademark Policy</a> and <a href='https://trademark-list.openjsf.org'>Trademark List</a>. Trademarks and logos not indicated on the <a href='https://trademark-list.openjsf.org'>list of OpenJS Foundation trademarks</a> are trademarks™ or registered® trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them.
trademark_legal: Copyright <a href='https://openjsf.org'>OpenJS Foundation</a> e Express contributors. Todos os direitos reservados. A <a href='https://openjsf.org'>OpenJS Foundation</a> possui marcas registradas e utiliza marcas registradas. Para obter uma lista de marcas registradas da <a href='https://openjsf.org'>Fundação OpenJS</a>, por favor veja nossa <a href='https://trademark-policy.openjsf.org'>Politica de Marca</a> e <a href='https://trademark-list.openjsf.org'>Lista de Marcas</a>. Marcas e logotipos não indicados na lista <a href='https://trademark-list.openjsf.org'>de marcas registradas da OpenJS Foundation</a> são marcas registradas ou registradas de seus respectivos titulares. O uso deles não implica em nenhuma afiliação ou endosso por eles.
4 changes: 2 additions & 2 deletions pt-br/advanced/healthcheck-graceful-shutdown.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ redirect_from: " "

## Desligamento Gracioso

When you deploy a new version of your application, you must replace the previous version. The process manager you're using will first send a SIGTERM signal to the application to notify it that it will be killed. Once the application gets this signal, it should stop accepting new requests, finish all the ongoing requests, clean up the resources it used, including database connections and file locks then exit.
Quando você publica uma nova versão do seu aplicativo, você deve substituir a versão anterior. The process manager you're using will first send a SIGTERM signal to the application to notify it that it will be killed. Once the application gets this signal, it should stop accepting new requests, finish all the ongoing requests, clean up the resources it used, including database connections and file locks then exit.

### Exemplo

Expand All @@ -28,7 +28,7 @@ process.on('SIGTERM', () => {

## Verificações de integridade

A load balancer uses health checks to determine if an application instance is healthy and can accept requests. For example, [Kubernetes has two health checks](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/):
A load balancer uses health checks to determine if an application instance is healthy and can accept requests. Por exemplo, [Kubernetes tem dois exames de saúde](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/):

- `liveness`, that determines when to restart a container.
- `readiness`, that determines when a container is ready to start accepting traffic. When a pod is not ready, it is removed from the service load balancers.
14 changes: 7 additions & 7 deletions pt-br/guide/error-handling.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,17 @@ app.get('/user/:id', async (req, res, next) => {
```

Se `getUserById` lança um erro ou rejeita, `next` será chamado com
o erro lançado ou o valor rejeitado. If no rejected value is provided, `next`
will be called with a default Error object provided by the Express router.
o erro lançado ou o valor rejeitado. Se nenhum valor rejeitado for fornecido, `next`
será chamado com um objeto de erro padrão fornecido pelo roteador Express.

Se passar qualquer coisa para a função `next()`
(exceto a sequência de caracteres `'route'`),
o Express considera a solicitação atual como estando em erro e irá
ignorar quaisquer funções restantes de roteamento e middleware que
não sejam de manipulação de erros.

If the callback in a sequence provides no data, only errors, you can simplify
this code as follows:
Se o callback em uma sequência não fornecer dados, somente erros, você pode simplificar
este código da seguinte forma:

```js
app.get('/', [
Expand All @@ -80,9 +80,9 @@ app.get('/', [
])
```

In the above example, `next` is provided as the callback for `fs.writeFile`,
which is called with or without errors. If there is no error, the second
handler is executed, otherwise Express catches and processes the error.
No exemplo acima, `next` é fornecido como o callback para `fs.writeFile`,
que é chamado com ou sem erros. Se não houver erro, o segundo manipulador
é executado, caso contrário as capturas e processam o erro.

You must catch errors that occur in asynchronous code invoked by route handlers or
middleware and pass them to Express for processing. Por exemplo:
Expand Down