- React native dependencies You can find it here It's recommanded to install it without expo.
You need the following tools to start this project :
- docker(engine > 18 and compose > 1.23)
- ngrok
Add your host file :
- Open
C:/Windows/System32/drivers/etc/hostsin an admin bloc note - Insert
127.0.0.1 api.polygaroo.localhost
127.0.0.1 polygaroo.localhost# from ngrok folder
ngrok http api.polygaroo.localhost:80
# copy domain name in .env file (for example 1a2b3c4d.ngrok.io)
# copy in App/Config/index.js for API_URL
docker-compose up -dDouble-clic sur polygaroo/dockerCreateSuperAdmin.sh pour exécuter la création du super admin.
Ce dernier exécute sur mongo dans le conteneur polygarou_mongo_1, le script polygaroo/api/createSuperAdmin.js
(copié précédement dans le conteneur) qui fait l'insertion de l'user suivant :
- email : super@admin.fr
- password : superPolygaroo
- name : superAdmin
- is_admin : true
- Node 11.12
- MongoDB shell 4.2.1
- yarn 1.16.0
- run following scripts :
cd api
yarn
cd ../bo
yarn- Go to
api/index.jsand modify
mongoose.connect('mongodb://mongo:27017/restpolygaroo', {
useNewUrlParser: true
} )to
mongoose.connect('mongodb://localhost:27017/restpolygaroo', {
useNewUrlParser: true
} )In a terminal :
cd api
yarn nodemon index.jsApi is running here
In another terminal :
cd bo/polygaroobo
yarn run serveBackOffice is running here
Yo can setup the projet by running :
yarn installto install the dependencies- create your configuration file
App/Config/index.jsfromindex.dev.js(if you are in dev environment) and fill the missing values - run the following steps for your platform
- only the first time you run the project, you need to generate a debug key with:
cd android/appkeytool -genkey -v -keystore debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000cd ../..to come back to the root folder
react-native run-androidto run the Android application (remember to start a simulator or connect an Android phone)
