diff --git a/.vscode/launch.json b/.vscode/launch.json index fda821a0c..4916a51ac 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,6 +1,7 @@ { "version": "0.2.0", "configurations": [ + { "name": "Iniciar", "type": "node", @@ -61,6 +62,27 @@ "console": "internalConsole", "sourceMaps": false, "outFiles": [] + }, + { + "name": "gulp debug", + "type": "node", + "request": "launch", + "program": "${workspaceRoot}\\@salix\\node_modules\\gulp\\bin\\gulp.js", + "stopOnEntry": false, + "args": [], + "cwd": "${workspaceRoot}\\@salix", + "preLaunchTask": null, + "runtimeExecutable": null, + "runtimeArgs": [ + "--nolazy" + ], + "env": { + "NODE_ENV": "development" + }, + "console": "internalConsole", + "sourceMaps": false, + "outFiles": [] } + ] } \ No newline at end of file diff --git a/@salix/gulpfile.js b/@salix/gulpfile.js index 29c2ed3f4..2d421d4a3 100644 --- a/@salix/gulpfile.js +++ b/@salix/gulpfile.js @@ -105,7 +105,7 @@ gulp.task('routes', function() { var regex = new RegExp('^src/(.*)/routes\.js$'); function cb(file) { - var relative = file.relative.replace('\\', '/'); + var relative = file.relative.replace(/\\/g,'/'); var dirname = relative.match(regex)[1]; return {dirname: dirname}; } diff --git a/dev.cmd b/dev.cmd index 5c37499c2..7ad8db07b 100644 --- a/dev.cmd +++ b/dev.cmd @@ -1,6 +1,6 @@ @echo off -set currentDir=%~dp0 +set currentDir=%cd% set nginxPrefix=%currentDir%\services\nginx set nginxConf=%nginxPrefix%\conf-dev.conf @@ -12,18 +12,19 @@ goto caseUsage :caseStart call "%0" stop echo "################################ Starting services" + if not exist "%nginxPrefix%\temp" (mkdir "%nginxPrefix%\temp") + start /I nginx -c "%nginxConf%" -p "%nginxPrefix%" call forever start forever.json call forever list - call mkdir "%nginxPrefix%\temp" - call start /b nginx -c "%nginxConf%" -p "%nginxPrefix%" + cd @salix gulp goto caseExit :caseStop echo "################################ Stoping services" + if exist "%nginxPrefix%\temp\nginx.pid" (nginx -c "%nginxConf%" -p "%nginxPrefix%" -s stop) forever stopall - nginx -c "%nginxConf%" -p "%nginxPrefix%" -s stop goto caseExit :caseUsage diff --git a/services/nginx/.gitignore b/services/nginx/.gitignore index 185616dcd..f0f054830 100644 --- a/services/nginx/.gitignore +++ b/services/nginx/.gitignore @@ -1,2 +1,3 @@ +logs/* static/* temp/* \ No newline at end of file diff --git a/services/nginx/logs/error.log b/services/nginx/logs/error.log index e69de29bb..3b4e114bb 100644 --- a/services/nginx/logs/error.log +++ b/services/nginx/logs/error.log @@ -0,0 +1,7 @@ +2016/12/28 09:50:24 [notice] 5196#5988: signal process started +2016/12/28 10:09:41 [notice] 11168#10432: signal process started +2016/12/28 14:03:31 [notice] 10312#9012: signal process started +2016/12/28 14:04:01 [notice] 9996#32: signal process started +2016/12/28 14:08:07 [notice] 7984#8980: signal process started +2016/12/28 14:13:33 [notice] 10144#6644: signal process started +2016/12/28 14:44:57 [notice] 3248#9176: signal process started