How to deploy in local machine
Deploy Api-Server and Mobile App in Local machine
Installation Steps
Download FlatAndFlatmates full app and extract it
Open terminal in extracted folder
Api Server
Run
cd ApiServer/
in terminalOpen another terminal and enter
mongod
this would start mongo serverRun
npm install
oryarn install
to install packagesUpdate the OneSignal AppId and Api key for Mobile App in
ApiServer/server/service/pushNotifications.js at line 8 nad 9.
Update the Cloudinary details
cloud_name
,api_key,
api_secret
inApiServer/config/cloudinaryConfig.js
Run
npm start
in terminal to start server
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
FlatAndFlatmates Mobile App
Install packages Navigate to MobileApp folder of the app run
yarn
or runnpm i
Update your server url (Ip address) in MobileApp/config.js
serverSideUrl: 'http://00.00.00.00'
Run on iOS Navigate to ios folder of Mobile App and then run
pod install
Opt #1:
Open the project in Xcode from
ios/FlatAndFlatmates.xcworkspace
Click
run
button to simulate
Opt #2:
Run
react-native run-ios
in your terminal
Run on Android
Make sure you have an
Android emulator
installed and running or connect to android deviceRun
react-native run-android
in your terminal
Configuring Google Map
Update YOUR_GOOGLE_API_KEY
in MobileApp/ios/AppName/AppDelegate.m file for ios in line 30
Update YOUR_GOOGLE_API_KEY
in MobileApp/android/app/src/main/res/values/strings.xml file for Android in line 4
You need to update key YOUR_GOOGLE_API_KEY
inside MobileApp/src/Util/data.js
file in line 3
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 28,35 && android/app/src/main/res/values/strings.xml
If you have trouble setting up follow here
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 MobileApp/src/Util/data.js
file.
You have to follow here to set up the environment.
Last updated