From 7358e18d5cb6040b3a7be278fe694eaba8ae2805 Mon Sep 17 00:00:00 2001 From: Jeff Minard Date: Mon, 8 Aug 2016 08:46:07 -0700 Subject: [PATCH] Doc cleanup (#67) * Dockerfile dev needs git and no longer needs global grunt * Node will use .bin apps by default; adding a watch command * Warnings about cloud provider blocking added * Cleans up docs by reducing duplication and just generally cleaning up the instructions * Missing apache2 page * Add python-dev dependency to linux install instructions; fixes #74 --- Dockerfile.dev | 5 +- docs/about/contributing.rst | 2 +- docs/about/development.rst | 54 ++++------ docs/advanced-install/amazon-ecs.md | 2 + docs/advanced-install/digital-ocean.md | 2 +- docs/basic-install/google-maps.md | 13 +-- docs/basic-install/index.rst | 136 +++++++++++++++++++++---- docs/basic-install/linux.rst | 21 ++-- docs/basic-install/osx.md | 95 +---------------- docs/basic-install/windows.md | 83 +-------------- docs/extras/apache2.md | 68 +++++++++++++ package.json | 7 +- 12 files changed, 230 insertions(+), 258 deletions(-) create mode 100644 docs/extras/apache2.md diff --git a/Dockerfile.dev b/Dockerfile.dev index 270b10426f..5011331584 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -33,10 +33,7 @@ WORKDIR /usr/src/app CMD [ "sh" ] # basic packages we're using -RUN apk add --update ca-certificates build-base nodejs ruby ruby-dev libffi-dev - -# so that the npm-installed grunt can be called with just "grunt" -RUN npm install -g grunt-cli +RUN apk add --update ca-certificates build-base nodejs ruby ruby-dev libffi-dev git # For travis-ci RUN gem install travis diff --git a/docs/about/contributing.rst b/docs/about/contributing.rst index 2008379999..d8b17ad4a5 100644 --- a/docs/about/contributing.rst +++ b/docs/about/contributing.rst @@ -23,7 +23,7 @@ Titles will be shown at the top of a page and in the site nagivation. A title sh Once done editing your page, add it under one of the ``toctree`` sections in ``index.rst``. -Now to previwing everything, open a terminal, go into the ``docs`` directory and use ``make html`` to generate a static copy of the documentation you can browse. Alternatively, you can run ``make auto`` and you'll get a webserver which live updates pages as you save them. +Now to preview your changes, open a terminal, go into the ``docs`` directory and use ``make clean-auto auto``. This will start a local webserver with live updates pages as you save them. Finally, when you are finished, submit your changes as a Pull Request to be reviewed. diff --git a/docs/about/development.rst b/docs/about/development.rst index 08257b5d71..a619388a0c 100644 --- a/docs/about/development.rst +++ b/docs/about/development.rst @@ -1,63 +1,45 @@ App Development -####################### +############### -.. note:: This article is about contributing to the development codebase. For contributing to the map itself see :doc:`contributing`. +.. note:: + + This article is about contributing to the development codebase. For contributing to the wiki see :doc:`contributing`. .. warning:: - These instructions will help you get started contributing code to the **develop** branch. - If you just want to **use the map** you should not use **develop**. - `Download a release `_ instead. + These instructions will help you get started contributing code to the ``develop`` branch. If you just want to **use the map** you should not use ``develop``, instead follow the :doc:`/basic-install/index` instructions -Development requires several tools to get the job done. Python, obviously, needs to be installed. We also utilize NodeJS and Grunt for front-end tasks. +Development requires several tools to get the job done. Python, obviously, needs to be installed. We also utilize NodeJS and Grunt for front-end asset compilation. The :doc:`/basic-install/index` instructions have an extra section about getting node installed. Follow that. Node and Grunt -*********************** +************** Grunt is a tool to automatically run tasks against the code. We use grunt to transform the Javascript and CSS before it's run, and bundle it up for distribution. If you want to change the Javascript or CSS, you must install and run Grunt to see your changes -Installing Node -==================== - -Download Node from the official site and install it. Version 4 or 6 will both work. - -https://nodejs.org/en/ - -Installing ``grunt`` -==================== - -After Node is installed, go into the project directory from the command-line, as usual. - -Then run this command +Compiling Assets +================ -``npm install -g grunt`` - -This installs a "global" copy of grunt on your machine. You also need a local copy for the project. Run: - -``npm install`` +After Grunt is installed successfully, you need to run it when you change Javascript or CSS. -This will install everything the ``package.json`` lists; a local copy of grunt, a lot of plug-ins, etc. +Simply type -Running ``grunt`` -=================== +.. code-block:: bash -After Grunt is installed successfully, you need to run it when you change Javascript or CSS. + npm run watch -Simply type +on the command-line. This runs a default grunt "task" that performs a number of subtasks, like transforming JS with Babel, minifying, linting, and placing files in the right place. It will also automatically start a "watch" which will automatically rebuild files as you modify them. You can stop grunt-watch with CTRL+C. -``grunt`` +If you'd like to just build assets once, you can run: -on the command-line. This runs a default grunt "task" that performs a number of subtasks, like transforming JS with Babel, minifying, linting, and copying (see `Gruntfile.js `_) +.. code-block:: bash -grunt-watch -==================== + npm run build -We've configured Grunt to run a "watch" task by default. Grunt will sit in the background continually re-running its tasks any time a Javascript or CSS file changes. You can leave this Watch task running while you code, to avoid the need to continually re-run Grunt every time you make a change. You can stop grunt-watch with CTRL+C. The "/dist" directory -*********************** +********************* Files in the "static/dist/" subdirectories should not be edited. These will be automatically overwritten by Grunt. diff --git a/docs/advanced-install/amazon-ecs.md b/docs/advanced-install/amazon-ecs.md index 01e7ebf3c1..cb844c5d2a 100644 --- a/docs/advanced-install/amazon-ecs.md +++ b/docs/advanced-install/amazon-ecs.md @@ -1,5 +1,7 @@ # Amazon ECS +> **Warning** -- Most cloud providers have been IP blocked from accessing the API + Amazon ECS is essentially managed docker allowed you to run multi-container environments easily with minimal configuration. In this guide we'll create an ECS Task that will run a single pokemongo-map container with a MariaDB container ## Requirements diff --git a/docs/advanced-install/digital-ocean.md b/docs/advanced-install/digital-ocean.md index 26dda25d03..ad8cac36cb 100644 --- a/docs/advanced-install/digital-ocean.md +++ b/docs/advanced-install/digital-ocean.md @@ -1,6 +1,6 @@ # DigitalOcean -**Note:** There have been reports of Niantic servers blocking requests from DigitalOcean's major IP blocks (as well as Amazon AWS, and Microsoft Azure): login failures with the Error 403 are due to this. If you are experiencing this issue there is nothing we can do about it at this time. +> **Warning** -- Most cloud providers have been IP blocked from accessing the API ## Prerequisites diff --git a/docs/basic-install/google-maps.md b/docs/basic-install/google-maps.md index 35a541aba6..b7bc8c0a1d 100644 --- a/docs/basic-install/google-maps.md +++ b/docs/basic-install/google-maps.md @@ -1,12 +1,8 @@ # Google Maps Key -This project uses Google Maps. There's one map coupled with the project, but as it gets more popular we'll definitely hit the rate-limit making the map unusable. +This project uses Google Maps. Each instance of Google Maps requires an API key to make it functional. This is quick guide to setting up your own key. -## Common error - -![Map Error](../_static/img/EOdAqUo.png) - -## How to fix +## Getting the API Key 1. Go to [Google API Console](https://console.developers.google.com/) @@ -40,7 +36,6 @@ This project uses Google Maps. There's one map coupled with the project, but as - Choose Google Places API Web Service - Click 'ENABLE' -## Configuration of API Key +## Using the API Key -1. Navigate to your pokemon map directory, and inside the config folder you will find config.ini. -2. Add your previously created Google API key in this file, save it, and re-run the server! it should be working now! If you see an error, make sure you actually enabled the Javascript API in Step 5. +The google maps api key may either be installed in `config/config.ini` file, or you can provide it as a command line parameter like `-k 'your key here'` diff --git a/docs/basic-install/index.rst b/docs/basic-install/index.rst index 7af52f9bc1..1f20a5272a 100644 --- a/docs/basic-install/index.rst +++ b/docs/basic-install/index.rst @@ -1,55 +1,125 @@ Basic Installation ################## -Follow one of the guides below to get the basic pre-requisits installed: +These instructions cover an instation from a **release** as well as from a git clone. + +Prerequisites +************* + +Follow one of the guides below to get the basic prerequisites installed: * :doc:`osx` * :doc:`windows` * :doc:`linux` -Credentials and Downloading +Credentials +*********** + + * You'll need an active Pokemon Trainer Club account or Google account + * Get a :doc:`google-maps` + +Downloading the Application *************************** -Register either a Pokemon Club account or a Google account to use with the map. Do not use your main account. +You have an important decision here, you may either download a "release" or use ``git`` to fetch the latest development version. The release versions tend to be more stable and require less technical install steps, but they will have fewer features. -Then, download one of the following branches below: +Release Version +=============== +If you want to run a release version, visit the `Github releases page `_ and download and extract the release you want to run - * `Master `_ (Stable Builds) - * `Develop `_ (Active Development) -The ``develop`` branch will have latest features from the development team, however it may be unstable at some times. +``git`` Version +=============== + +If you're going to run a copy from the latest ``develop`` branch in ``git`` you can clone the repository: + +.. code-block:: bash -Extract this zip file to any location. + git clone https://github.com/PokemonGoMap/PokemonGo-Map.git Installing Modules ****************** At this point you should have the following: -* Python 2.7 -* pip -* nodejs -* Unpacked archive of PokemonGo-Map + * Python 2.7 + * pip + * PokemonGo-Map application folder -Open up your shell and change to the directory of PokemonGo-Map then run the following commands: +First, open up your shell (``cmd.exe``/``terminal.app``) and change to the directory of PokemonGo-Map. -Linux: +You can verify your installation like this: .. code-block:: bash - sudo -H pip install -r requirements.txt - sudo npm install -g grunt - npm install - npm run-script build + python --version + pip --version + +The output should look something like: + +.. code-block:: bash + + $ python --version + Python 2.7.12 + $ pip --version + pip 8.1.2 from /usr/local/lib/python2.7/site-packages (python 2.7) + +Now you can install all the Python dependencies: Windows: .. code-block:: bash pip install -r requirements.txt - npm install -g grunt + +Linux/OSX: + +.. code-block:: bash + + sudo -H pip install -r requirements.txt + +``git`` Version Extra Steps +=========================== + +.. warning:: + + This only applies if you are running from a ``git clone``. If you are using a release version, skip this section + +In order to run from a git clone, you must compile the front-end assets with node. Make sure you have node installed for your platform: + + * `Windows `_ + * `OSX `_ + * Linux -- refer to the `package installation `_ for your flavor of OS + +Once node/npm is installed, open a command window and validation your install: + +.. code-block:: bash + + node --version + npm --version + +The output should look something like: + +.. code-block:: bash + + $ node --version + v4.7.0 + $ npm --version + 3.8.9 + +Once node/npm is installed, you can install the node dependencies and build the front-end assets: + +.. code-block:: bash + npm install - npm run-script build + + # The assets should automatically build (you'd see something about "grunt build") + # If that doesn't happen, you can directly run the build process: + npm run build + + +Basic Launching +*************** Once those have run, you should be able to start using the application, like so: @@ -59,7 +129,29 @@ Once those have run, you should be able to start using the application, like so: Read through the available options and set all the required CLI flags to start your own server. At a minimum you will need to provide a location, account login credentials, and a :doc:`google maps key `. -Accessing -********* +The most basic config you could use would look something like this: + +.. code-block:: bash + + python ./runserver.py -a ptc -u 'USERNAME_HERE' -p 'PASSWORD_HERE' \ + -l 'a street address or lat/lng coords here' -st 3 -k 'maps key here' Open your browser to http://localhost:5000 and your pokemon will begin to show up! Happy hunting! + +Updating the Application +************************ + +PokemonGo-Map is a very active project and updates often. You can follow the `latest changes `_ to see what's changing. + +If you are running a **release** version, you can simply start this tutorial over again with a new download. + +If you are running a ``git`` version, you can update with a few quick commands: + +.. code-block:: bash + + git pull + pip install -r requirements.txt --upgrade + npm install + npm run build + +You can now restart your ``runserver.py`` command. \ No newline at end of file diff --git a/docs/basic-install/linux.rst b/docs/basic-install/linux.rst index 77e432920c..ca90ef2b08 100644 --- a/docs/basic-install/linux.rst +++ b/docs/basic-install/linux.rst @@ -3,26 +3,17 @@ Linux Install Installation will require Python 2.7 and Pip. -Ubuntu -====== +Ubuntu/Debian +************* You can install the required packages on Ubuntu by running the following command: .. code-block:: bash - sudo apt-get install python python-pip nodejs npm - -Debian -====== - -You can install the required packages on Debian by running the following command: - -.. code-block:: bash - - sudo apt-get install python python-pip nodejs npm nodejs-legacy + sudo apt-get install python python-pip python-dev Red Hat or CentOs or Fedora -=========================== +*************************** You can install required packages on Red Hat by running the following command: @@ -31,4 +22,6 @@ You may also need to install the EPEL repository to install python-pip and pytho .. code-block:: bash yum install epel-release - yum install python python-pip nodejs npm python-devel + yum install python python-pip python-devel + +All set, head back to the basic install guide. \ No newline at end of file diff --git a/docs/basic-install/osx.md b/docs/basic-install/osx.md index 287414e4f3..c1a63982e9 100644 --- a/docs/basic-install/osx.md +++ b/docs/basic-install/osx.md @@ -1,4 +1,4 @@ -# OSX Install +# OSX Prerequisites In order to run the project, you will need Python, pip and the project dependencies. Version 2.7 is what we usually test against. You can use 3.x but no support will be given. @@ -10,97 +10,12 @@ Version 2.7 is what we usually test against. You can use 3.x but no support will ## Step 1: Install Homebrew -**Open up Terminal** +Follow the install instructions at http://brew.sh/ to get Homebrew installed -1. Click on the rocket ship -2. In the search, type in `Terminal` -3. Type: - - ``` - /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" - ``` - -## Step 2: Install Requirements - -``` -brew install git python python protobuf -``` - -## Step 3: Clone PokemonGo-Map - -For this guide we'll be using the Documents folder. - -**While still in the Terminal** - -1. Navigate to the user home folder. - - ``` - cd ~/Documents` - ``` - -2. Clone the repository - - ``` - git clone https://github.com/AHAAAAAAA/PokemonGo-Map.git - ``` - -Now we have all PokemonGo-Map files inside our Documents folder. Git clone automatically creates a folder called PokemonGo-Map - -## Step 4: Get your own Google Maps API Key - -Read up on [the maps key page]() -Go to [this page](https://console.developers.google.com/flows/enableapi?apiid=maps_backend,geocoding_backend,directions_backend,distance_matrix_backend,elevation_backend,places_backend&keyType=CLIENT_SIDE&reusekey=true) to get your own Google Maps API Key. If you do not get your own API Key, you'll very likely run into an error telling you that you reached the daily request limit. **Additionally, you do not need to just get the key but you need to ensure the Google Maps JavaScript API is enabled for your account.** This is done from the homepage of the Google developer tools. Just getting the key alone does not automatically enable the JavaScript API that is necessary for the application. - -If you got your own API Key, open the *credentials.json* file inside the *PokemonGo-Map/config* folder. You can edit that file with Mac's built in text editor. Now replace the API Key in line 6 with the one you got from that Google website. - -## Step 6: Setup PokemonGo-Map - -**While still in the Terminal:** - -1. Navigate into PokemonGo-Map folder - - ``` - cd ~/Documents/PokemonGo-Map - ``` - -2. Install specific python requirements - - ``` - pip install --upgrade -r requirements.txt - ``` - -## Step 7: Start PokemonGo-Map - -Now we are ready to start the map. - -A full list of parameters you can use with the map and what they mean can be found [here](https://github.com/AHAAAAAAA/PokemonGo-Map#usage). This guide will only cover the important ones: - --a: Use either `ptc` or `google` for the login --u: Your Username --p: Your Password --l: The location you want to scan for Pokémon. You can try something like `La tour Eiffel, Paris`, your street or exact coordinates in this format: `47.6062100 -122.3320700` --st: The amount of steps to take (5 steps is approximately a 1.2km radius according to [this list](https://github.com/AHAAAAAAA/PokemonGo-Map#usage)) - -> **Note**: It's recommended that you create a dummy account to use this Map with in order to prevent your real account from getting (soft)banned. - -The final command should look like this (for master branch): - -``` -python runserver.py -a ptc -u johndoe -p ilovemama -l "400 Broad St, Seattle, WA 98109, USA" -st 5 -``` - -If you are working in the develop branch, then use runserver.py instead of example.py - -Hit enter and view your map in all it's glory at http://127.0.0.1:5000/. Done! - -![Map](../_static/img/EBkRhvZ.png) - -## Bonus: How to update PokemonGo-Map - -Since PokemonGo-Map is under active development and gets a lot of updates, you probably want to get all the latest features and bug fixes. You can see the latest updates (called commits) [here](https://github.com/AHAAAAAAA/PokemonGo-Map/commits/master). To update your copy, *Git Bash here* from the PokemonGo-Map folder, paste this command and hit enter: +## Step 2: Install Project Requirements ``` -git pull +brew install git python protobuf ``` -Now repeat Step 7 to restart your map. \ No newline at end of file +All set, head back to the basic install guide. \ No newline at end of file diff --git a/docs/basic-install/windows.md b/docs/basic-install/windows.md index 779ee68a9d..d289e6653c 100644 --- a/docs/basic-install/windows.md +++ b/docs/basic-install/windows.md @@ -1,4 +1,4 @@ -# Windows Install +# Windows Prerequisites In order to run the project, you will need Python, pip and the project dependencies. @@ -8,11 +8,8 @@ In order to run the project, you will need Python, pip and the project dependenc - [Python 2.7.1.2](https://www.python.org/downloads/release/python-2712/) - [Microsoft Visual C++ Compiler for Python 2.7](https://www.microsoft.com/en-us/download/details.aspx?id=44266) -## Known Issues - -- If you are having Issues with Step 6 and did not install Python on your C: drive, try uninstalling and reinstalling Python on C: before opening an issue (thanks @[RicarFox](https://github.com/RicarFox/)). - ## Step 1: Install Git for Windows + Download Git for Windows from the link above and install it. You will be fine with all recommended options during the setup. ![Installing Git...](../_static/img/BRCsqTv.png) @@ -25,27 +22,9 @@ Download Python 2.7.1.2 either as the 64bit or the 32bit version from the link a ![Python](../_static/img/BagNkfw.png) -## Step 3: Clone PokemonGo-Map - -Navigate to the folder you want to download PokemonGo-Map to. For this guide we'll be using the Downloads folder. Rightclick inside the folder and select *Git Bash Here* from the context menu. - -![Git Bash Here](../_static/img/oTkVzsB.png) - -You can copy the following command and paste it with a rightclick into the shell window that has opened: - -`git clone https://github.com/AHAAAAAAA/PokemonGo-Map.git` - -![Clone](../_static/img/5xUhQOM.png) - -Now we have all PokemonGo-Map files inside our Downloads folder. +> You may run into issues running python if you do not install it onto your primary partition (typically `c:`) -## Step 4: Get your own Google Maps API Key - -Go to [this page](https://console.developers.google.com/flows/enableapi?apiid=maps_backend,geocoding_backend,directions_backend,distance_matrix_backend,elevation_backend,places_backend&keyType=CLIENT_SIDE&reusekey=true) to get your own Google Maps API Key. If you do not get your own API Key, you'll very likely run into an error telling you that you reached the daily request limit. - -If you got your own API Key, rename *config.ini.example* to *config.ini* file inside the *PokemonGo-Map/config* folder. You can edit that file with Windows' built in text editor. Now replace the API Key under #Misc with the one you got from that Google website. Make sure you remove the # before any line you want to use. - -## Step 5: Fix Python Path +## Optional: Fix Python Path > This step is not needed on every system, but it's probably good to check if everything is set up correctly. @@ -53,56 +32,4 @@ First things first. Press `WindowsKey + PAUSE` on your keyboard and select *Adva ![Variable issue](../_static/img/2LeOviQ.png) -## Step 6: Setup PokemonGo-Map - -That was the hard part. Now navigate to the PokemonGo-Map folder and *Git Bash Here*, like in Step 3. Now paste this command: - -`pip install -r requirements.txt` - -![Requirements](../_static/img/6p6uzHB.png) - -###Develop branch only instructions - -In order for the map to load on the develop branch, there are some additions requirements. - -1. Install node.js. That will install the `npm` command. - -[Node.js 6.3.1] (https://nodejs.org/dist/v6.3.1/node-v6.3.1-x64.msi) -2. Open an *admin* command prompt and type `npm install -g grunt-cli` . This installs Grunt's command line interface (CLI) globally. -3. Once grunt is installed, run it by typing `npm install`. This will automatically run the `grunt build` command. - - - -## Step 7: Start PokemonGo-Map - -Now we are ready to start the map. - -A full list of parameters you can use with the map and what they mean can be found [here](https://github.com/AHAAAAAAA/PokemonGo-Map#usage). This guide will only cover the important ones: - --a: Use either `ptc` or `google` for the login --u: Your Username --p: Your Password --l: The location you want to scan for Pokémon. You can try something like `La tour Eiffel, Paris`, your street or exact coordinates in this format: `47.6062100 -122.3320700` --st: The amount of steps to take (5 steps is approximately a 1.2km radius according to [this list](https://github.com/AHAAAAAAA/PokemonGo-Map#usage)) - -> **Note**: It's recommended that you create a dummy account to use this Map with in order to prevent your real account from getting (soft)banned. - -The final command should look like this: - -`python example.py -a ptc -u johndoe -p ilovemama -l "400 Broad St, Seattle, WA 98109, USA" -st 5` - -![Final command](../_static/img/axKgvEI.png) - -Hit enter and view your map in all it's glory at http://127.0.0.1:5000/. Done! - -![Map](../_static/img/EBkRhvZ.png) - ---- - -## Bonus: How to update PokemonGo-Map -Since PokemonGo-Map is under active development and gets a lot of updates, you probably want to get all the latest features and bug fixes. You can see the latest updates (called commits) [here](https://github.com/AHAAAAAAA/PokemonGo-Map/commits/master). To update your copy, *Git Bash here* from the PokemonGo-Map folder, paste this command and hit enter: - -`git pull origin master` - -Now repeat Step 7 to restart your map. - - +All set, head back to the basic install guide. diff --git a/docs/extras/apache2.md b/docs/extras/apache2.md new file mode 100644 index 0000000000..e4ccae3544 --- /dev/null +++ b/docs/extras/apache2.md @@ -0,0 +1,68 @@ +# Apache2 Reverse Proxy + +If you do not want to expose pokemongo-map to the web directly or you want to place it under a prefix, follow this guide: + +Assuming the following: + + * You are running pokemongo-map on the default port 5000 + * You've already made your machine available externally + +1. Install [Apache2](https://httpd.apache.org/docs/current/install.html) -- plenty of tutorials on the web for this. +2. Enable the mods needed + ``` + sudo a2enmod proxy proxy_http proxy_connect ssl rewrite + ``` +3. Create a file /etc/apache2/sites-available/pokemongo-map.conf + ``` + sudo nano /etc/apache2/sites-available/pokemongo-map.conf` + ``` + copy pasta: + ``` + + + ServerName pokemongo.yourdomain.com + + ProxyPass / http://127.0.0.1:7777/ + ProxyPassReverse / http://127.0.0.1:7777/ + + RewriteCond %{HTTP_HOST} !^pokemongo\.yourdomain\.com$ [NC] + RewriteRule ^/$ http://%{HTTP_HOST}/ [L,R=301] + + ErrorLog ${APACHE_LOG_DIR}/error.log + CustomLog ${APACHE_LOG_DIR}/access.log combined + + + + + + ServerName pokemongo.yourdomain.com + + ProxyPass / http://127.0.0.1:7777/ + ProxyPassReverse / http://127.0.0.1:7777/ + + RewriteCond %{HTTP_HOST} !^pokemongo\.yourdomain\.com$ [NC] + RewriteRule ^/$ http://%{HTTP_HOST}/ [L,R=301] + + ErrorLog ${APACHE_LOG_DIR}/error.log + CustomLog ${APACHE_LOG_DIR}/access.log combined + + SSLCertificateFile /var/www/ssl_keys/yourcert.crt + SSLCertificateKeyFile /var/www/ssl_keys/yourkey.key + SSLCertificateChainFile /var/www/ssl_keys/yourintermediatecert.crt + + + ``` + If you want your maps at `pokemongo.yourdomain.com`, keep it just like it is + If you want your maps at `yourdomain.com/go/` (note the trailing slash!) + ``` + (take out ServerName) + ProxyPass /go/ http://127.0.0.1:7777/ + ProxyPassReverse /go/ http://127.0.0.1:7777/ + + RewriteCond %{HTTP_HOST} !^yourdomain\.com/go/$ [NC] + RewriteRule ^/go/$ http://%{HTTP_HOST}/go/ [L,R=301] + ``` +4. Test your Apache2 config: `sudo service apachectl configtest` +5. Enable your new config: `sudo a2ensite pokemongo-map` +6. Reload your Apache2 service: `service apache2 reload` +7. You can now access it by going to: `http(s)://yourdomain.com/go` or `http(s)://pokemongo.yourdomain.com` diff --git a/package.json b/package.json index 5c6c15bf64..e9efa4f11b 100644 --- a/package.json +++ b/package.json @@ -29,9 +29,10 @@ "grunt-usemin": "latest" }, "scripts": { - "postinstall": "./node_modules/.bin/grunt build", - "build": "./node_modules/.bin/grunt build", - "lint": "./node_modules/.bin/grunt lint" + "postinstall": "grunt build", + "build": "grunt build", + "watch": "grunt default", + "lint": "grunt lint" }, "repository": { "type": "git",