Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

338
Views
Can we use a common service without module into other module (specifically controller) in NestJs?

I am working on a NestJs project. There are different modules. I want to have a common service without module that can b used anywhere in the app. Is it possible to use a common service without module? If yes then how can i use it? Actually i want to use different functions from a service.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

if you want to use service term you need to register @Injectable() service to a module you can register it to app.module.ts, but it depends on what common.service.ts exactly do ?

if you want to use a dependency injection mechanism of Nestjs you should add @Injectable and a Scope then register it into whatever module do you want.

if you got the answer plz vote me up :), if not leave a comment with more details

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!