Skip to content

Cluniat/polygaroo

Repository files navigation

POLYGAROO project

Table of contents

About the project

Built with

Getting started

Installations

  • React native dependencies You can find it here It's recommanded to install it without expo.

Running with Docker

Prerequisites

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/hosts in an admin bloc note
  • Insert
127.0.0.1   api.polygaroo.localhost
127.0.0.1   polygaroo.localhost

Ngrok (dev only)

# 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

Start API and backOffice

docker-compose up -d
  • API is running by default here
  • BackOffice is running by default here

Create Super Admin User with docker

Double-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 :

Running without Docker

Prerequisites

  • 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.js and modify
mongoose.connect('mongodb:https://mongo:27017/restpolygaroo', {
    useNewUrlParser: true
} )

to

mongoose.connect('mongodb:https://localhost:27017/restpolygaroo', {
    useNewUrlParser: true
} )
Start API and backOffice

In a terminal :

cd api
yarn nodemon index.js

Api is running here

In another terminal :

cd bo/polygaroobo
yarn run serve

BackOffice is running here

Running mobile application

Yo can setup the projet by running :

  • yarn install to install the dependencies
  • create your configuration file App/Config/index.js from index.dev.js (if you are in dev environment) and fill the missing values
  • run the following steps for your platform
Android
  • only the first time you run the project, you need to generate a debug key with:
    • cd android/app
    • keytool -genkey -v -keystore debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000
    • cd ../.. to come back to the root folder
  • react-native run-android to run the Android application (remember to start a simulator or connect an Android phone)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published