Skip to content

Commit cd405fb

Browse files
committed
Use absolute path in require()
1 parent b94d934 commit cd405fb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎server.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ program
2424
.option('--handler <path>', 'Lambda@Edge handler script.')
2525
.option('--port <number>', 'HTTP server port number.', 3000)
2626
.action(function(name) {
27-
const script = name.handler;
27+
const script = process.cwd() + '/' + name.handler;
2828

2929
if (fs.existsSync(script)) {
3030
const {handler} = require(script);

0 commit comments

Comments
 (0)