Skip to content
This repository has been archived by the owner on Jun 13, 2024. It is now read-only.

can't find fuction 'foo' in module 'projectdir/test' #280

Open
yygutn opened this issue Dec 29, 2018 · 0 comments
Open

can't find fuction 'foo' in module 'projectdir/test' #280

yygutn opened this issue Dec 29, 2018 · 0 comments

Comments

@yygutn
Copy link

yygutn commented Dec 29, 2018

test.js

const napa = require('napajs');
const zone = napa.zone;
const producer = napa.zone.create('test', {workers: 6});

for (let index = 0; index < 10; index++) {
            let item = result[index];
            producer.execute('./test',
                'foo',
                [channel, app], {timeout: 0})
                .then((response) => {
                    console.log('execute succeeded:', response.value);
                })
                .catch((error) => {
                    console.log(error)
                });
}

 function foo(p1,p2) {
   return p1+p2;
}
module.exports.foo = foo
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant