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

180
Views
Passing parameter from local system to gitub repo which is used as npm package in node js

Need small help I wrote a program and uploaded to the github repo. So I can use this repo as a npm package

So I fetch the repo as npm package in my other program

my package.json look like this

"dependencies":{
  "admin-server":"github:esrot-server/admin-server#main"
}

but the problem is I want to pass one parameter to github repo from my other program so I wrote code like this in my github admin-server

index.js

// all the code here
const admin_task =(server_detail) =>{
// all the other code here
}

module.exports = admin_task(server_detail);

and in my other repo I am writing the code like this

client-side repo (other program) index.js

const admin_setup = require("admin-server");

// all the code here

const adminFunction = ()=>{
  // all the other code
  admin_setup(adminDetails);
}

so When I run the program I am getting server_detail is not define but I have define this in my github repo.

I just wanted to know how can I pass my detail from client server to admin server which is in github repo and how can I tackle this problem

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

0

You are exporting it wrong. Simply export the function. don't call it:

module.exports = admin_task;
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!