master
branch, with more stable code..env
, located in the platform-client
folder that you have recently cloned from github..env
in your platform-client
folder. This .env
file is required and it doesn't exist by default. Therefore, you must create it. In the following sections, we'll let you know about the contents that you should put in that file.platform-client
folder:touch .env
command to the same end..env
file, and its name is BACKEND_URL
. Its purpose is to configure the client with the URL to use, in order to send HTTP network requests to the Platform API. If this variable is wrong, nothing works. This variable usually takes different values for different users..env
file consists of just this variable..env
file write the BACKEND_URL
variable, corresponding to your Platform API URL address. This is an example, showing the format used, (don't just copy & paste it to your file!):.env
file, copy the variable value (the part starting with "http://"\) and paste it in your browser's address bar, then hit enter. As a result you should see something similar to this:PORT
variable specifies at which port the local development server should listen. The default for this variable is 3000
.TX_USERNAME
and TX_PASSWORD
are variables for configuring the credentials to the Transifex service, which stores multi-lingual versions of the Platform client text displayed on the screen. These are only required if you are going to develop in languages other than English.APP_LANGUAGES
is a list of language codes (in ISO-639-1 format) to download from Transifex. For example APP_LANGUAGES=sw,en,es
would enable the client to appear in Swahili, English and Spanish.OAUTH_CLIENT_ID
and OAUTH_CLIENT_SECRET
are variables used during the process of authentication of a user against the API. You can ignore these 99% of the times. Also, these are not particularly secret nor provide much security. They just have to exist, and they do by default. (If you must know, their values default to ushahidiui
and 35e7f0bca957836d05ca0492211b0ac707671261
respectively)platform-client
folder for changes, and rebuild the application as needed.npm run serve
:PORT
on your.env
file).gulp
command, although a bit funny-sounding, is key for all development tasks on that part of the application./legacy/node_modules/.bin
directory of your platform-client folder. This makes it a bit awkward to invoke, see these examples:gulp
when building and developing in the app, there are a couple approaches:gulp
globally. You would do it with his command:.bashrc
file in your home directory, and append the following line: