Skip to content

Run code once per node server startup #15341

Closed Answered by leerob
bhavin7181 asked this question in Help
Discussion options

You must be logged in to vote

We have a solution for this now! instrumentation

// instrumentation.ts

import { init } from 'package-init'
 
export function register() {
  init()
}

Let me know if this solves your use case.

Related: #45628

Replies: 45 comments 98 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@kostenickj
Comment options

@hbel
Comment options

@Shrivallabh
Comment options

Comment options

You must be logged in to vote
2 replies
@hbel
Comment options

@pgayvallet
Comment options

Comment options

You must be logged in to vote
1 reply
@destroyer22719
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@khromov
Comment options

@hbel
Comment options

@assetcorp
Comment options

Comment options

You must be logged in to vote
1 reply
@hbel
Comment options

Comment options

You must be logged in to vote
2 replies
@alexweininger
Comment options

@alvitoraidhy
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@dora-gt
Comment options

@gregg-cbs
Comment options

@gregg-cbs
Comment options

@gregg-cbs
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@gregg-cbs
Comment options

@anthonyalayo
Comment options

Comment options

You must be logged in to vote
2 replies
@GitVex
Comment options

@jalovatt
Comment options

Comment options

You must be logged in to vote
1 reply
@gregg-cbs
Comment options

Comment options

You must be logged in to vote
6 replies
@Aaqu
Comment options

@nikola-lenert
Comment options

@Aaqu
Comment options

@nikola-lenert
Comment options

@Aaqu
Comment options

Comment options

You must be logged in to vote
23 replies
@Aaqu
Comment options

@jviall
Comment options

@jviall
Comment options

@jviall
Comment options

@theDanielJLewis
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
17 replies
@galaxynova1999
Comment options

@alecmerdler
Comment options

@setoelkahfi
Comment options

@mihilt
Comment options

@gregg-cbs
Comment options

Answer selected by leerob
Comment options

You must be logged in to vote
4 replies
@WillCalderwood
Comment options

@leerob
Comment options

@WillCalderwood
Comment options

@WillCalderwood
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@rechenberger
Comment options

@rechenberger
Comment options

@Artsu
Comment options

Comment options

You must be logged in to vote
1 reply
@canadaduane
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet