Skip to content

Commit

Permalink
Merge branch 'master' into SFD-30-adding-workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
MatheusSanchez committed Jan 25, 2024
2 parents cd083dc + 6440298 commit 49fb680
Show file tree
Hide file tree
Showing 16 changed files with 600 additions and 113 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
"extends": [
"@rocketseat/eslint-config/node"
],
"camelcase": "off'"
"camelcase": "off'",
"no-useless-constructor": "off"
}
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
node_modules
.env
coverage
coverage

prisma/vitest-environment-prisma/pnpm-lock.yaml
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,37 @@ $ cd orange-back
# Instale as dependências
$ pnpm install


# Subir o container do Docker com banco de dados
$ docker compose up -d


# Crie as variáveis de ambiente, um arquivo .env na raiz do projeto.
$ Veja o exemplo no arquivo ./env.example

# Gere o client do Prisma
$ pnpm prisma generate

# Execute a aplicação em modo de desenvolvimento
$ pnpm run dev

# O servidor inicicará na porta:3333 - acesse <http://localhost:3333>


## Rodando os testes

# Voce pode rodar os teste unitários nos seguinte scripts:

$ pnpm run test
$ pnpm run test:watch
$ pnpm run test:coverage

# A aplicaçao também conta com teste e2e
# É necessário fazer o setup dos testes e2e antes;

$ pnpm run pretest:e2e

# Rodando os teste e2e
$ pnpm run test:e2e

```
19 changes: 13 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,24 @@
"main": "index.js",
"scripts": {
"dev": "tsx watch src/server.ts",
"test:coverage": "vitest run --coverage",
"test": "vitest run",
"test:watch": "vitest"
"test": "vitest run --dir src/use-cases",
"test:create-prisma-environment": "pnpm link ./prisma/vitest-environment-prisma",
"test:install-prisma-environment": "pnpm link vitest-environment-prisma",
"test:watch": "vitest --dir src/use-cases",
"pretest:e2e": "run-s test:create-prisma-environment test:install-prisma-environment",
"test:e2e": "vitest run --dir src/controller",
"test:e2e:watch": "vitest --dir src/controller",
"test:coverage": "vitest run --coverage"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"@rocketseat/eslint-config": "^2.1.0",
"@types/node": "^20.11.5",
"@types/node": "^20.11.6",
"@vitest/coverage-v8": "^1.2.1",
"eslint": "8.52.0",
"npm-run-all": "^4.1.5",
"prisma": "5.8.1",
"tsup": "^8.0.1",
"tsx": "^4.7.0",
Expand All @@ -28,10 +34,11 @@
"@types/bcryptjs": "^2.4.6",
"@types/express": "^4.17.21",
"bcryptjs": "^2.4.3",
"dotenv": "^16.3.2",
"dotenv": "^16.4.1",
"fastify": "^4.25.2",
"pg": "^8.11.3",
"pg-hstore": "^2.3.4",
"vite-tsconfig-paths": "^4.3.1",
"zod": "^3.22.4"
}
}
}
Loading

0 comments on commit 49fb680

Please sign in to comment.