Skip to content

Commit

Permalink
Merge pull request #7 from fga-eps-mds/dev
Browse files Browse the repository at this point in the history
Release 1
  • Loading branch information
DaviMatheus authored Jul 28, 2024
2 parents d89b7e3 + f75a5de commit 6500a04
Show file tree
Hide file tree
Showing 45 changed files with 1,467 additions and 8,608 deletions.
13 changes: 13 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Versioning and metadata
.git
.gitignore
.dockerignore

# Build dependencies
dist.do
node_modules
node_module

# Misc
.eslintrc.js
README.md
18 changes: 18 additions & 0 deletions .env.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
MONGODB_URI=''
EMAIL_USER=""
EMAIL_PASS=""
SENDGRID_API_KEY=""
JWT_SECRET=""
JWT_EXPIRATION=""
GOOGLE_CLIENT_ID=""
GOOGLE_CLIENT_SECRET=""
GOOGLE_CALLBACK_URL=""
MICROSOFT_CLIENT_ID=""
MICROSOFT_CLIENT_SECRET=""
MICROSOFT_TENANT_ID=""
MICROSOFT_CALLBACK_URL=""
FRONTEND_URL=""
# Estas etapas a baixo ainda nao sao necessarias

# RABBIT_MQ_URI=amqp://admin:admin@rabbitmq:5672
# RABBIT_MQ_USER_QUEUE=USER
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,6 @@ pids

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Ignore package-lock.json
package-lock.json
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM node:22-alpine

WORKDIR /app


COPY package*.json ./

RUN npm install

COPY . .

RUN npm run build

CMD ["npm", "run", "start:dev"]
21 changes: 21 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
services:
user-api:
container_name: user-api
restart: on-failure
build: .
environment:
- NODE_ENV=development
ports:
- 3000:3000
volumes:
- ./src:/app/src
- ./test:/app/test
env_file:
- .env
# networks:
# - calculus-network

# networks:
# calculus-network:
# external: true

31 changes: 17 additions & 14 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
import type {Config} from 'jest';
import type { Config } from 'jest';

const config: Config = {
preset: 'ts-jest',
testEnvironment: 'node',
reporters: [
'default',
[
'jest-sonar',
{
outputDirectory: 'reports',
outputName: 'sonar-report.xml'
}
]
]
preset: 'ts-jest',
testEnvironment: 'node',
reporters: [
'default',
[
'jest-sonar',
{
outputDirectory: 'reports',
outputName: 'sonar-report.xml',
},
],
],
moduleNameMapper: {
'^src/(.*)$': '<rootDir>/src/$1',
},
};

export default config;
export default config;
16 changes: 14 additions & 2 deletions nest-cli.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@
"collection": "@nestjs/schematics",
"sourceRoot": "src",
"compilerOptions": {
"deleteOutDir": true
"deleteOutDir": true,
"webpack": true
},
"projects": {
"common": {
"type": "library",
"root": "libs/common",
"entryFile": "index",
"sourceRoot": "libs/common/src",
"compilerOptions": {
"tsConfigPath": "libs/common/tsconfig.lib.json"
}
}
}
}
}
Loading

0 comments on commit 6500a04

Please sign in to comment.