Browse Source

Export handler as default export

master
Luke Childs 2 years ago
parent
commit
c40482edcc
  1. 8
      api/index.js
  2. 2
      test/test.js

8
api/index.js

@ -36,10 +36,12 @@ fi`;
}, usage); }, usage);
}; };
module.exports = reverseShell; const handler = (request, response) => {
module.exports.handler = (request, response) => {
const { address } = request.query; const { address } = request.query;
response.send(reverseShell(address)); response.send(reverseShell(address));
}; };
module.exports = handler;
module.exports.reverseShell = reverseShell;

2
test/test.js

@ -1,5 +1,5 @@
import test from 'ava'; import test from 'ava';
import reverseShell from 'this'; import { reverseShell } from 'this';
test('reverseShell is a function', t => { test('reverseShell is a function', t => {
t.is(typeof reverseShell, 'function'); t.is(typeof reverseShell, 'function');

Loading…
Cancel
Save