blob: d80f1efbf2335e68000b0241f4e2a41bf8614bf7 [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.dist
Matteo Scandolo4e870232017-01-30 13:43:05 -08009 ],
Matteo Scandoloc80ccbd2017-02-27 16:24:33 -080010 middleware: function(req, res, next){
11 if (req.url.indexOf('xosapi') !== -1) {
12 proxy.web(req, res);
13 }
14 else{
15 next();
16 }
17 },
Matteo Scandolo4e870232017-01-30 13:43:05 -080018 routes: {
19 "/spa": "./dist"
20 }
Matteo Scandolod819c922016-12-02 14:06:14 -080021 },
Matteo Scandoloc80ccbd2017-02-27 16:24:33 -080022 open: true
Matteo Scandolod819c922016-12-02 14:06:14 -080023 };
24};