Skip to content

Commit ccb50d9

Browse files
committed
adding resolving path of root
1 parent f54a96c commit ccb50d9

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

bin/lib/options.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const fs = require('fs')
2+
const path = require('path')
23

34
module.exports = [
45
// {
@@ -11,7 +12,8 @@ module.exports = [
1112
help: 'Root folder to serve (defaut: \'./\')',
1213
question: 'Path to the folder you want to serve. Default is',
1314
default: './',
14-
prompt: true
15+
prompt: true,
16+
filter: (value) => path.resolve(value)
1517
},
1618
{
1719
name: 'port',

0 commit comments

Comments
 (0)