Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

217
Visualizações
Azure Functions (Typescript) - How can I run a setup/bootstrapper function

I have several functions in my function app. Is there a way to have a setup/bootstrapper function run before all functions? This would be something that maybe sets up some global variables, logging, etc. I'm it would just be an index.ts file that gets run before each function.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Currently I'm doing this using a Higher Order function:

export function withSetup(fn) {
    return (...args) => {
        // Do some setup stuff here
        return fn(...args);
    };
}

This works but if you forget to wrap the function it can cause strange issues. I'm curious if there are other answers.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda