How to deploy in local machine

Deploy Api-Server and Mobile App in Local machine

Installation Steps

  • Download DeliveryZ full app and extract it

  • Open terminal in extracted folder

Api Server

  1. Run cd ApiServer/ in terminal

  2. Open another terminal and enter mongod this would start mongo server

  3. Run npm install or yarn install to install packages

  4. Update the OneSignal AppId and Api key for Rider & Driver App in ApiServer/scripts/appConfig.js

  5. Update the Cloudinary details cloud_name, api_key, api_secret in ApiServer/scripts/serverConfig.js

  6. Run npm start in terminal to start server

Note : Skip this if don't want seed data

Run npm run seed in terminal and then look for messages in terminal for completion of seeding data.

Issue Resolved : Common Issue of the mongo server

Unable to lock file: /data/db/mongod.lock resource temporarily unavailable. Is a mongod instance already running? , terminating, You need to enter, sudo killall -15 mongod

DeliveryZ Mobile App

  • Install packages Navigate to MobileApp/DeliveryZ or MobileApp/PartnerZ folder of the app run yarn or run npm i

  • Run on iOS Navigate to ios folder of the DeliveryZ or PartnerZ folder and then run pod install

    • Opt #1:

      • Open the project in Xcode from ios/PartnerZ.xcworkspace

      • Click run button to simulate

    • Opt #2:

      • Run react-native run-ios in your terminal (Don't run on DeliveryZ)

Note

Do not run DeliveryZ App in Xcode as it does not support Razorpay payment gateway(Runs Only on Simulator-iphone-XR and physical devices)

  • Run on Android

    • Make sure you have an Android emulator installed and running or connect to android device

    • Run react-native run-android in your terminal

Configuring Google Map

Update YOUR_GOOGLE_API_KEY in AppName/ios/AppName/AppDelegate.m file for ios in line 27

Update YOUR_GOOGLE_API_KEY in AppName/android/app/src/main/AndroidManifest.xml file for Android in line 33 for the rider, line 34 for driver

You need to update key YOUR_GOOGLE_API_KEY inside config/config.js file in your app in the root folder of Mobile App

Get Google Map API key from here

If you have trouble setting up follow here

Configuring Facebook Login

Create App on Facebook Developer

You need to update the Facebook App ID in ios/AppName/Info.plist line 43,60 && android/app/src/main/res/values/strings.xml

If you have trouble setting up follow here

Configuring Google Login

Create OAuth client ID follow here

You need to update the YOUR_CLIENT_ID in ios/AppName/Info.plist in line 53 and add file google-services.json in AppName/android/app folder .

Follow documentation here and link your Mobile App

Configuring Sentry

Create App on sentry.io You need to update sentry.properties file inside ios folder and in an android folder, along with it update the DNS for your app in App.js in the root folder of Mobile App

Follow documentation here and link your Mobile App.

Configuring OneSignal

Before setting up the onesignal you will need to generate an iOS Push Certificate && a Google Server API Key on Firebase console.

Go to Firebase Console -> Settings -> Project Settings -> Cloud Messaging -> iOS app configuration

You will get Google Server API Key on the same page of iOS app configuration

You need to update key OnesignalAppId inside config.js file in your app in the root folder of Mobile App

You have to follow here to set up the environment.

Last updated