Skip to content

Commit 90375c2

Browse files
committed
Adds curl test command
1 parent b7a723f commit 90375c2

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

bootstrap.sh

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ RED='\033[0;31m'
33
GREEN='\033[0;32m'
44
NC='\033[0m'
55
CHECK="${GREEN}\xE2\x9C\x93${NC}"
6+
67
confirm() {
78
DEFAULT=$1;
89
shift
@@ -105,10 +106,12 @@ cat > ./package.json << EOF
105106
{
106107
"name": "$NPM_APP_NAME",
107108
"scripts": {
109+
"prestart": "mongodb-runner start",
108110
"start": "parse-server ./config.json"
109111
},
110112
"dependencies": {
111-
"parse-server": "^2.0.0"
113+
"parse-server": "^2.0.0",
114+
"mongodb-runner": "3.1.15"
112115
}
113116
}
114117
EOF
@@ -144,6 +147,15 @@ npm install
144147

145148
confirm 'Y' '\nDo you want to start the server now? (Y/n): '
146149

150+
151+
CURL_CMD=$(cat << EOF
152+
curl -X POST -H 'X-Parse-Application-Id: ${APP_ID}' \\
153+
-H 'Content-Type: application/json' \\
154+
-d '{"foo":"bar"}' http://localhost:1337/parse/classes/TestObject
155+
EOF)
156+
157+
echo "Test your setup with:\n\n${CURL_CMD}"
158+
147159
echo "\n${CHECK} running npm start\n"
148160
149-
npm start
161+
VERBOSE=1 npm start

0 commit comments

Comments
 (0)