diff --git a/Jenkinsfile b/Jenkinsfile index 86c18f5..e6d092a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,7 +9,7 @@ pipeline { sh "git clone https://git.raphix.fr/infrastructure/neutral.git" sh "cd neutral" sh "npm i" - sh "PORT=3100 node bin/www" + sh "ENV='TEST' node bin/www" } } diff --git a/app.js b/app.js index fc6ba27..81fa8a7 100644 --- a/app.js +++ b/app.js @@ -68,5 +68,13 @@ app.use(function(err, req, res, next) { ntr.checkUser() +if ("ENV" in process.env) { + if(process.env.ENV == "TEST") { + process.exit(1) + + } + +} + module.exports = app;