blob: dd7acd57cd155872e1922ce20d73556f10486bb7 [file] [log] [blame]
Matteo Scandolod819c922016-12-02 14:06:14 -08001const conf = require('./gulp.conf');
Matteo Scandoloc80ccbd2017-02-27 16:24:33 -08002const proxy = require('./proxy');
Matteo Scandolod819c922016-12-02 14:06:14 -08003
4module.exports = function () {
5 return {
6 server: {
7 baseDir: [
8 conf.paths.tmp,
9 conf.paths.src
Matteo Scandolo1aee1982017-02-17 08:33:23 -080010 ],
11 middleware: function(req, res, next){
12 if (req.url.indexOf('xosapi') !== -1) {
13 proxy.web(req, res);
14 }
15 else{
16 next();
17 }
18 }
Matteo Scandolod819c922016-12-02 14:06:14 -080019 },
Matteo Scandolo1aee1982017-02-17 08:33:23 -080020 open: true
Matteo Scandolod819c922016-12-02 14:06:14 -080021 };
22};