Answering your Nashville acceptable land use questions.
Nashville Zone Lookup is composed of two separate parts:
- A VueJS frontend
- Elixir/Phoenix backend
This backend serves both the frontend and the data consumed by the frontend.
Prerequisites
- Make sure Elixir and NodeJS are installed.
- Make sure Docker is installed
To build and run this app locally:
- Install the Mix dependencies
mix deps.get
. - Compile the project
mix compile
. - Run the Phoenix server
mix phx.server
. - Navigate to frontend app
cd frontend
. - Install the NPM dependencies
npm install
. - Run the frontend's HTTP server
npm run dev
. - Run the database in the background with
docker run -p 5432:5432 --name nashville_zone_lookup_dev -d postgres:9.6
. - Create and migrate your database with
mix ecto.setup && mix ecto.migrate
- Optionally run the Postgres shell with
docker exec -it nashville_zone_lookup_db psql -U postgres nashville_zone_lookup_dev
Note: Additional commands are available for the frontend app and are documented in its README.
To build and run this app for production:
- Install the Mix dependencies
mix deps.get
. - Compile the project
mix compile
. - Build the frontend app for the Phoenix server
mix nashville_zone_lookup.prepare_static_assets
. - Run the Phoenix server
mix phx.server
.
To unit test the backend:
- Install the Mix dependencies
mix deps.get
. - Compile the project
mix compile
. - Run tests
mix test
. - Run tests against external systems
mix test --include external
.
To test the frontend:
- Navigate to frontend app
cd frontend
. - Install the NPM dependencies
npm install
. - Run the unit tests
npm run unit
. - Run the end-to-end tests
npm run e2e
. - Run the unit and end-to-end tests
npm run test
.
- Make sure you've followed the database setup instructions in Running.
- Download the latest zoning spreadsheet here as a CSV
- Run
mix help nashville_zone_lookup.ingest_land_use_table
and follow instructions to execute that command. - If you need to re-import data, drop and re-create your database:
mix ecto.drop && mix ecto.setup && mix ecto.migrate
This repository is configured to deploy master automatically to Heroku via Travis CI.
- For a detailed description of the project, check out the Request for Volunteers.
- For other shared documents, check out Google Drive.
- For the latest design documents, check out Invision.
- For the planning board, check out Github.
- Latest list of zoning codes
Email [email protected] if the above links do not work.
MIT