This repository has been archived by the owner on Aug 7, 2023. It is now read-only.
-
Say I have this code: const express = require('express');
const app = express();
app.get('/', (req, res) => {
res.send('Hello World!');
});
module.exports = app; I could add |
Beta Was this translation helpful? Give feedback.
Answered by
abdelhai
May 31, 2022
Replies: 1 comment 1 reply
-
you can have module.exports = app;
!process.env.DETA_RUNTIME && app.listen(3000): |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
abdelhai
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
you can have
app.listen(...)
at the end of you file, this won't cause any problem.if you must use a clean solution, check if you're outside a Micro first. this code should work: