Do I have to run supertokens.init() for every api ...
# support-questions
n
Do I have to run supertokens.init() for every api route in Next.js if I am not deploying in a serverless environment?
r
U don’t have to run that if not deployed in serverless env.
n
Where would be the appropriate place to call this in a non serverless env? in the _app.tsx file?
r
Yea. If you knows it’s the backend and not the frontend. So maybe call it when something like process.env is not undefined. Not sure what the right check is
n
I think it's just typeof window === 'undefined'
r
Yes. Maybe. Would need test