Specifics Re: Deployment - welikepie/asos-hangout-app GitHub Wiki
Create the package.json file pre-emptively. As long as all the links are correct, everything will work.
##hangout apps##
- Create as many as you are going to need.
- The OAuth part is important. Click "API Access" when in the API console, and create the OAuth part. Relatively straightforward. Obv. Make sure the app works etc.
##.htaccess files##
- If the .htaccess file is referencing the .htpasswd file, then it needs to have an absolute filepath from the root folder of your server down. In windows, this will start with a drive letter (Usually C:/). In linux, this will start with a forward slash.
- In the gateway folder, .htaccess needs to be changed such that the filepath is relative (with a forward slash starting and from the root folder) to the gateway directory without ending slash. In the case of uscampaign.asos.com this would be /admin/gateway. If you do this wrongly, the gateway folder will 500 on you.
##Configuring gateway##
- gateway.php -> DB credentials. These need to be set as if you are accessing the sever side database from the server.
- index.php -> URL_PREFIX. This needs to be changed such that the filepath is relative (with a forward slash starting and from the root folder of the site) to the gateway directory without ending slash. In the case of uscampaign.asos.com this would be /admin/gateway. If you do this wrongly, accessing [URL]+admin/gateway/products will display "Incorrect URL".
##Node server##
- Create upstart job in /etc/init , assuming upstart is installed and run that puppy. Make sure server port in server.js and the server port in the package.js match.
- The server port is currently set to 8890 for dev versions, and 8889 for release versions, and is set manually.
##Handling Multiple Countries##
- It's not the most efficient way, but as many instances of DB's and Scrapers and Gateways as necessary.
- Scrapers have been modified for the countries already.
- Copy and re-name the gateways and modify the internal files for use with each database
- Also edit the links to each country's domain in gateway.php
- For all non-latin languages with special characters, set the MYSQLI charset to force to UTF8, otherwise you will be quizzical as to why things are going wrong.
- For all non-latin languages with special characters, remove the UTF8 encode on the description in the gateway.php file as well.
##Landing Page##
- At deploy time, make sure scripts/main.js has the correct require settings at the top of the file.