Skip to content
This repository was archived by the owner on Aug 7, 2023. It is now read-only.
Discussion options

You must be logged in to vote

You could use if statement on deta runtime env for that. here's the sample code

if (process.env.DETA_RUNTIME === "true") {
  module.exports = app;
} else {
  app.listen(PORT, () => console.log("running on local server")); // PORT is your port, use 4000 for example
}

Replies: 1 comment

Comment options

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