-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HRIS-361 [Task] Setup Nest.js under api_v2 folder #297
Conversation
api_v2/package.json
Outdated
"start:dev": "nest start --watch", | ||
"start:debug": "nest start --debug --watch", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
its good to have short command when running dev environment
"start:dev": "nest start --watch", | |
"start:debug": "nest start --debug --watch", | |
"dev": "nest start --watch", | |
"dev:debug": "nest start --debug --watch", |
api_v2/tsconfig.json
Outdated
"strictNullChecks": false, | ||
"noImplicitAny": false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
much better if we follow strict implementation
"strictNullChecks": false, | |
"noImplicitAny": false, | |
"strictNullChecks": true, | |
"noImplicitAny": true, |
@@ -0,0 +1,21 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- can we add ?
"noUnusedLocals": true,
"noUnusedParameters": true,
- much better to also have alias
"paths": { "@/*": ["src/*"] }
api_v2/tsconfig.json
Outdated
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | |
} | |
} | |
"exclude": ["node_modules", "dist"] | |
} |
api_v2/package.json
Outdated
"dev": "nest start --watch", | ||
"dev:debug": "nest start --debug --watch", | ||
"start:prod": "node dist/main", | ||
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i want to include npm run lint
without fix in husky pre-commit.
So dev can know that there are lint errors to fix and can be familiarize about linting.
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix", | |
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\"", | |
"lint:fix": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix", |
docker-compose.yml
Outdated
@@ -19,6 +19,21 @@ services: | |||
depends_on: | |||
- db | |||
|
|||
# ASP.NET Service |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# ASP.NET Service | |
# NestJS Service |
@@ -19,6 +19,21 @@ services: | |||
depends_on: | |||
- db | |||
|
|||
# ASP.NET Service | |||
api_v2: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Im just wondering what's the consideration why we containerized the api.
Its good that we have 1 command to run all servers but im worry if our laptops can handle many docker containers.
Is there is no difference about laptop performance running between npm run dev
or using docker
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do agree that it feels heavy whenever i try running the docker compose command. Thought there was a deployment benefit to this as to why the previous team implemented this.
Personally, I run the docker compose command to run all of servers apart from api_v2, which i run locally using npm run dev.
May i ask for your thoughts? @chevyB
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, its ok to retain the docker configs but when running local, its beneficial to use npm run dev
.
Let's update readme.md about using npm run dev
in local.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, will apply changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mdv-sunasterisk @chevyB
Just additional note though, the purpose of containers or even for VM, is to create a separate environment that will not tamper the host machine. But I do agree that somehow docker does not have a good review in terms of performance in local environment.
I can agree to just run node in the host machine instead of docker. Docker will be more responsible on infra stuffs like DB.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can remove this container nalang
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah wait, please keep this lang. I will be considering to deploy backend with docker. Sorry.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok copy, we'll be retaining the api_v2 container. Kindly requesting for next actions @jeremiahC, and may I confirm if we're already good for merging?
Issue Link
Backlog Link
Definition of Done
Notes
Pre-condition
Expected Output
Screenshots/Recordings
Note: Minimal pre-commit alterations were added after the time of recording.
Screen.Recording.2024-06-07.at.1.11.27.PM.mov