moved app_present inside bootstrap_express_app

This commit is contained in:
Sameer Naik
2017-01-27 13:21:28 +05:30
parent ca253addd0
commit 83bb39a12d
2 changed files with 10 additions and 8 deletions

View File

@@ -2,9 +2,7 @@
. /opt/bitnami/express/functions
if [ "$1" == npm ] && [ "$2" == "start" -o "$2" == "run" ]; then
if ! app_present; then
bootstrap_express_app
fi
bootstrap_express_app
add_dockerfile

View File

@@ -98,12 +98,16 @@ add_nodemon_support() {
}
bootstrap_express_app() {
log "Creating express application"
express . -f
if ! app_present; then
log "Creating express application."
express . -f
add_database_support
add_nodemon_support
add_sample_code
add_database_support
add_nodemon_support
add_sample_code
else
log "Skipping creation of new application. Already exists!"
fi
}
add_dockerfile() {