X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=app.js;h=967b86585033f8aa7a5bb4a4f77df0813dd9d671;hb=c10e69bfcf248c5e2c17b776e19c348b8acfecc7;hp=69607648a62a320499062f5708b35a1857a3fbe4;hpb=c88ec639a906f57dc11c7a64b5622beb448d5fd6;p=perso%2FImmae%2FProjets%2FNodejs%2FSurfer.git diff --git a/app.js b/app.js index 6960764..967b865 100755 --- a/app.js +++ b/app.js @@ -20,9 +20,13 @@ router.get('/api/files/*', files.get); router.put('/api/files/*', multipart, files.put); router.delete('/api/files/*', files.del); +// healthcheck in case / does not serve up any file yet +router.get('/', function (req, res) { res.sendfile(path.join(__dirname, '/app/welcome.html')); }); + app.use(morgan('dev')); app.use(compression()); app.use(bodyParser.json()); +app.use('/settings', express.static(__dirname + '/app')); app.use(express.static(__dirname + '/files')); app.use(router); app.use(lastMile());