Skip to content

Latest commit

 

History

History
102 lines (65 loc) · 3.16 KB

INSTALL.md

File metadata and controls

102 lines (65 loc) · 3.16 KB

EqualStreetNames : Install & Run locally

Table of content

Install

This guide tries to go through some of the requirements for developing on this project, but feel free to adopt it to your own needs.

Requirements

PHP

Only PHP CLI (Command Line Interface) is required ; no need for a web-sver (like Apache or nginx).

Git (Windows)

Git installation is quite straightforward, and can also be replaced by installing a Git GUI, or a text editor that has Git built-in like Visual Studio Code. If you choose to install GIT standalone, you can leave most options to default, but it might be worth to change the editor config to an editor you prefer on this screen:

Editor selection

Setting up

Getting a working version of EqualStreetNames consists of a couple of steps:

  1. Clone the repository

    git clone https://github.com/EqualStreetNames/equalstreetnames.git
  2. Go to the folder

    cd equalstreetnames
  3. Initialize and download city submodules

    git submodule update --init --recursive
  4. Install JavaScript dependencies with npm (command to run in website/ directory)
    Required if you want to run the website locally

    npm install
  5. Install PHP dependencies with composer (command to run in process/ directory)
    Required if you want to run the data update process locally

    composer install

You should now have a completely working version of EqualStreetNames to work on.

Run Locally

Website

  1. Create a Mapbox token

  2. Create a file named .env in the website/ directory of the project

  3. Add the following line to the .env file: MAPBOX_TOKEN=[your Mapbox token] replacing [your Mapbox token] with the token you created

  4. Choose the city you want to run locally (command to run in website/ directory)

    npm run build:country:city -- --serve

    Example for Brussels, Belgium: npm run build:belgium:brussels -- --serve

  5. Once installed and running, go to http://localhost:1234/

Data update process

  1. Choose the city you want to update locally (command to run in process/ directory)

    composer run update-data -- --city=country/city

    Example for Brussels, Belgium: composer run update-data -- --city=belgium/brussels