Set Up - mirkode/asana-code-challenge GitHub Wiki
-
Clone the directory.
git clone https://github.com/mirkode/asana-code-challenge.git -
cdinto repository.
cd asana-code-challenge -
Copy
.env.exampleto.env.
cp .env.example .env -
Modify
.envfile.
vim .env -
Insert all needed API endpoints, keys, and data (more on this below).
DEFAULT= Insert your desired default provider (for me that is Google).
e.g.GOOGLE_API_KEY= Your Google Maps API key -
Start Up.
Fire up the app in theasana-code-challengedirectory by enteringrackup -p 4567(or any other port you need) -
Add Google Maps API key to
index.html.
Scroll to the bottom to theindex.htmlpage or search for<!-- ADD GOOGLE MAPS API KEY HERe -->.
ReplaceYOUR API KEY HEREwith your Google Maps API key, uncomment the script block and save the file.
In case you have forgotten this, there will be a little alert popping up.
As this is an acceptable solution if this app would be on production, please also delete the following lines:153 // Just a quickfix for development only. 154 // TODO: remove 155 setTimeout(function () { 156 if (typeof(map) === 'undefined') { 157 alert('Cannot load the map.\nDid you forget to set the API key in the index.html?\nPlease add it, otherwise the app won\'t function properly.'); 158 } 159 }, 500); -
Access.
In a browser open uphttp://localhost:4567/