Skip to content

Commit

Permalink
ci: vercel deployment configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
0xnigir1 committed Sep 10, 2024
1 parent 2b57b0f commit 8b12d58
Show file tree
Hide file tree
Showing 5 changed files with 2,071 additions and 15 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,5 @@ contracts/cache
# Turborepo
.turbo

.tmp
.tmp
.vercel
8 changes: 6 additions & 2 deletions apps/api/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { MetricsController, MetricsRouter } from "./metrics/index.js";

const logger = Logger.getInstance();

const main = async (): Promise<void> => {
const main = async (): Promise<Express.Application> => {
const memoryCache = await caching("memory", {
max: 150, // maximum number of items to store
ttl: config.pricing.cacheOptions.ttl * 1000 /*milliseconds*/,
Expand Down Expand Up @@ -61,6 +61,8 @@ const main = async (): Promise<void> => {
const app = new App(config, [metricsRouter], logger);

app.listen();

return app.app;
};

process.on("unhandledRejection", (reason, p) => {
Expand All @@ -71,6 +73,8 @@ process.on("uncaughtException", (error: Error) => {
logger.error(`An uncaught exception occurred: ${error}\n` + `Exception origin: ${error.stack}`);
});

main().catch((err) => {
const res = main().catch((err) => {
logger.error(`Caught error in main handler: ${err}`);
});

export default res;
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"tsconfig-paths": "4.2.0",
"turbo": "2.0.14",
"typescript": "5.1.3",
"vercel": "37.4.1",
"vitest": "2.0.5"
},
"packageManager": "[email protected]+sha1.8c155dc114e1689d18937974f6571e0ceee66f1d",
Expand Down
Loading

0 comments on commit 8b12d58

Please sign in to comment.