From e2b3a7ccef006f2f142c6c5d43bc936a924ca8c9 Mon Sep 17 00:00:00 2001 From: Gregg Tavares Date: Wed, 1 Nov 2023 20:29:42 +0900 Subject: [PATCH] add dirs to server --- Gruntfile.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index a95c033f..7cf32651 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -201,15 +201,17 @@ module.exports = function(grunt) { }; const hosts = []; - console.log('startServer'); + const root = path.join(__dirname, 'out'); + const server = new Servez(Object.assign({ - root: path.join(__dirname, 'out'), + root, dataDir, logger, }, { port: 8080, scan: true, index: true, + dirs: true, extensions: ['html'], })); server.on('host', function(...args) { @@ -226,7 +228,7 @@ module.exports = function(grunt) { }); grunt.registerTask('build', ['clean', 'copy:main', 'buildlessons']); - grunt.registerTask('buildwatch', ['build', 'serve', 'watch']); + grunt.registerTask('buildwatch', [/*'build',*/ 'serve', 'watch']); grunt.registerTask('default', ['eslint', 'build']); };