Next.js Discord

Discord Forum

adding first run feature to next app

Unanswered
Aditya Kirad posted this in #help-forum
Open in Discord
Hey folks I want to add the first run feature to my next app which only will run the first-time app is started also I want it run on server as I will do some database stuff in the first run feature and when the database stuff is completed I will be redirecting the user to route with some search param can anyone help me implementing this

1 Reply

If anyone has used medusa I want first run feature like that when the app first time starts an JWT token is created and added to invite table then this JWT token is added to /app/invite as search param also first_run=true added then we redirected to this route this insertion happens only first run not on subsequent run