Skip to content

Commit

Permalink
specifying node version and ignoring build
Browse files Browse the repository at this point in the history
  • Loading branch information
MatheusSanchez committed Jan 26, 2024
1 parent a3d9e78 commit 48a0771
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 25 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
build
node_modules
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ node_modules
.env
coverage

prisma/vitest-environment-prisma/pnpm-lock.yaml
prisma/vitest-environment-prisma/pnpm-lock.yaml
build
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
"version": "1.0.0",
"description": "",
"main": "index.js",
"engines": {
"node": "18"
},
"scripts": {
"build": "tsup --out-dir build --config tsup.config.ts",
"dev": "tsx watch src/server.ts",
"test": "vitest run --dir src/use-cases",
"test:create-prisma-environment": "pnpm link ./prisma/vitest-environment-prisma",
Expand All @@ -26,10 +30,10 @@
"npm-run-all": "^4.1.5",
"prisma": "5.8.1",
"supertest": "^6.3.4",
"tsup": "^8.0.1",
"tsx": "^4.7.0",
"typescript": "^5.3.3",
"vitest": "^1.2.1"
"vitest": "^1.2.1",
"tsup": "^8.0.1"
},
"dependencies": {
"@fastify/cors": "^8.5.0",
Expand Down
40 changes: 20 additions & 20 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions src/server.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import { app } from './app'
import { env } from './env'

app.listen({
app
.listen({
port: env.PORT,
host: 'RENDER' in process.env ? '0.0.0.0' : 'localhost',
})
.then(() => {
console.log('🔥🔥🔥 HTTP Server Running 🔥🔥🔥')
})
console.log(env)
})
5 changes: 5 additions & 0 deletions tsup.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { defineConfig } from 'tsup'

export default defineConfig({
entry: ['src', '!src/**/*.spec.*'],
})

0 comments on commit 48a0771

Please sign in to comment.