Skip to content

Commit

Permalink
refactor: support for deploy to vercel
Browse files Browse the repository at this point in the history
refactor: remove app.ts
  • Loading branch information
jellydn committed Sep 23, 2023
1 parent 9dcf002 commit 995b974
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ server.get(
}
);

const start = async () => {
async function startServer() {
try {
await server.listen({ port: 3000 });

Expand All @@ -96,4 +96,7 @@ const start = async () => {
}
};

start();
if (process.env.DEPLOYMENT_ENV !== 'vercel') startServer();

export default startServer;

0 comments on commit 995b974

Please sign in to comment.