.env, located in the
platform-clientfolder that you have recently cloned from github.
.envfile 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.
.envfile, 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.
.envfile consists of just this variable.
.envfile write the
BACKEND_URLvariable, corresponding to your Platform API URL address. This is an example, showing the format used, (don't just copy & paste it to your file!):
.envfile, 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:
PORTvariable specifies at which port the local development server should listen. The default for this variable is
TX_PASSWORDare 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_LANGUAGESis a list of language codes (in ISO-639-1 format) to download from Transifex. For example
APP_LANGUAGES=sw,en,eswould enable the client to appear in Swahili, English and Spanish.
OAUTH_CLIENT_SECRETare 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
platform-clientfolder for changes, and rebuild the application as needed.
npm run serve:
gulpcommand, although a bit funny-sounding, is key for all development tasks on that part of the application.
/legacy/node_modules/.bindirectory of your platform-client folder. This makes it a bit awkward to invoke, see these examples:
gulpwhen building and developing in the app, there are a couple approaches:
gulpglobally. You would do it with his command:
.bashrcfile in your home directory, and append the following line: