Compare commits
No commits in common. "a215d41ec35defe67d9f1c8d659a7887108c7dfc" and "d7052b691c0437ba0104a7d6d0105856ee661d65" have entirely different histories.
a215d41ec3
...
d7052b691c
|
@ -44,13 +44,12 @@ Thumbs.db
|
|||
/public
|
||||
|
||||
resource/
|
||||
mongodb-data/
|
||||
backup/
|
||||
|
||||
.idea/
|
||||
node_modules
|
||||
*/nbproject*
|
||||
.npm/
|
||||
mongodb-data/
|
||||
.bash_history
|
||||
.bash_logout
|
||||
.bashrc
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
|
|
@ -0,0 +1 @@
|
|||
|
|
@ -0,0 +1 @@
|
|||
|
|
@ -105,15 +105,7 @@ if (process.env.NODE_ENV !== config.test.env) {
|
|||
});
|
||||
} else {
|
||||
mongoose.connect(config.database.uri + config.test.db);
|
||||
for (let collection in mongoose.connection.collections) {
|
||||
mongoose.connection.collections[collection].drop(function (err) {
|
||||
if (err) {
|
||||
console.log('Error while test-Db clean up: ' + err);
|
||||
}
|
||||
});
|
||||
}
|
||||
app.listen(config.test.port);
|
||||
console.log('Listening on port ' + config.test.port);
|
||||
}
|
||||
|
||||
module.exports = app;
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
# array of available collection names
|
||||
col=(app_user awarding decoration rank squad user)
|
||||
|
||||
for i in "${col[@]}"
|
||||
do
|
||||
# provide date for restore process, if data import is needed
|
||||
if [ -z "$1" ]
|
||||
then
|
||||
mongoexport --db cc --collection $i --out $(date '+%Y-%m-%d')/collections/${i}.json;
|
||||
cp -R ../api/resource $(date '+%Y-%m-%d')/
|
||||
else
|
||||
mongoimport --db cc --collection $i --drop --file ${1}/collections/${i}.json
|
||||
rm -rf ../api/resource
|
||||
cp -Rv ${1}/resource ../api/
|
||||
fi
|
||||
done
|
|
@ -0,0 +1 @@
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
"postinstall": "npm install --prefix ./static && npm install --prefix ./api",
|
||||
"mongodb": "mongod --dbpath ./mongodb-data",
|
||||
"test": "npm test --prefix ./api",
|
||||
"e2e": "npm run deploy-static && concurrently \"npm run e2e --prefix ./api\" \"wait-on -t 60000 http://localhost:3001/ && npm run e2e --prefix ./static\" --success first --kill-others",
|
||||
"e2e": "npm run deploy-static && concurrently \"npm run e2e --prefix ./api\" \"$(npm bin)/wait-on -t 60000 http://localhost:3001/ && npm run e2e --prefix ./static\" --success first --kill-others",
|
||||
"start-e2e": "npm run deploy-static && npm run e2e --prefix ./api",
|
||||
"test-e2e": "npm run e2e --prefix ./static"
|
||||
},
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@angular/common": "^4.1.1",
|
||||
"@angular/cli": "1.0.5",
|
||||
"@angular/cli": "1.0.2",
|
||||
"@angular/compiler": "^4.1.1",
|
||||
"@angular/compiler-cli": "^4.1.1",
|
||||
"@angular/core": "^4.1.1",
|
||||
|
|
Loading…
Reference in New Issue