From e2c2b1a7d639ffecab6c6ab9b31096377b837323 Mon Sep 17 00:00:00 2001 From: Fabio Brasileiro Date: Mon, 16 Sep 2024 11:19:55 -0400 Subject: [PATCH] update: add base url --- package.json | 2 +- src/app.ts | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index b349dcf..7ac2548 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ }, "scripts": { "start:dev": "tsx watch src/server.ts", - "start": "node build/server.js", + "start": "node build/server.cjs", "build": "tsup src --out-dir build", "lint:format": "npx @biomejs/biome format --write ./", "lint": "npx @biomejs/biome lint --write ./", diff --git a/src/app.ts b/src/app.ts index 5b24b4f..4789b40 100644 --- a/src/app.ts +++ b/src/app.ts @@ -10,9 +10,14 @@ app.use(express.json()) app.use(cors()) +app.get('/', (_req, res) => { + res.send('Api next payment funcionando') +}) + // Defina as rotas para produtos e pagamentos app.use('/api/products', productRoutes) app.use('/api/payments', paymentRoutes) app.use('/api', authRoutes) // Adicione '/api' como prefixo para as rotas de autenticaĆ§Ć£o + export default app