-
Notifications
You must be signed in to change notification settings - Fork 1
/
start_meteor
executable file
·22 lines (20 loc) · 748 Bytes
/
start_meteor
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env bash
get_variable() {
[ -z "$1" ] && echo $2 || echo $1
}
DB=$(get_variable ${DB} "test161")
MONGO_URL=$(get_variable ${MONGO_URL} "mongodb://127.0.0.1:27017/${DB}")
MONGO_OPLOG_URL=$(get_variable ${MONGO_OPLOG_URL} "mongodb://127.0.0.1:27017/local?authSource=${DB}")
KEYGEN_ENDPOINT=$(get_variable ${KEYGEN_ENDPOINT} "http://127.0.0.1:4000/api-v1/keygen")
TEST161_DEBUG=$(get_variable ${TEST161_DEBUG} "1")
[ ${TEST161_DEBUG} -eq "0" ] && TEST161_DEBUG=""
echo "Keygen: ${KEYGEN_ENDPOINT}"
echo "Mongo: ${MONGO_URL} ${MONGO_OPLOG_URL}"
echo "Debug: $TEST161_DEBUG"
cd app
npm install
MONGO_URL=${MONGO_URL} \
MONGO_OPLOG_URL=${MONGO_OPLOG_URL} \
KEYGEN_ENDPOINT=${KEYGEN_ENDPOINT} \
TEST161_DEBUG=${TEST161_DEBUG} \
meteor $@