File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ RED='\033[0;31m'
3
3
GREEN=' \033[0;32m'
4
4
NC=' \033[0m'
5
5
CHECK=" ${GREEN} \xE2\x9C\x93${NC} "
6
+
6
7
confirm () {
7
8
DEFAULT=$1 ;
8
9
shift
@@ -105,10 +106,12 @@ cat > ./package.json << EOF
105
106
{
106
107
"name": "$NPM_APP_NAME ",
107
108
"scripts": {
109
+ "prestart": "mongodb-runner start",
108
110
"start": "parse-server ./config.json"
109
111
},
110
112
"dependencies": {
111
- "parse-server": "^2.0.0"
113
+ "parse-server": "^2.0.0",
114
+ "mongodb-runner": "3.1.15"
112
115
}
113
116
}
114
117
EOF
@@ -144,6 +147,15 @@ npm install
144
147
145
148
confirm ' Y' ' \nDo you want to start the server now? (Y/n): '
146
149
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
+
147
159
echo "\n${CHECK} running npm start\n"
148
160
149
- npm start
161
+ VERBOSE=1 npm start
You can’t perform that action at this time.
0 commit comments