Moped Documentation
  • Welcome 👋
  • User Guides
    • Getting started
    • Map a project
  • Product Management
    • User communication
    • User management
    • User analytics
    • Local testing
    • Release process
    • Patch release process
    • MUI X Pro License
    • Integrations
      • Dataset documentation
      • ArcGIS Online
      • eCapris
      • Power BI
    • Features
  • Dev Guides
    • DB Docs & Data dictionary
    • Database backup policy
    • Moped Read Replica
    • How-to's
      • How do I start the Hasura cluster locally?
      • How do I launch the Hasura Console?
      • How do I get a JWT token?
      • How to ping the GraphQL API
      • How to ping the REST API
      • How do I connect a database with Postgres GUIs?
      • How do I connect to the RDS instance?
      • How to load production data into a local instance
      • How do I update seed data?
    • Hasura
      • Hasura Roles
      • Hasura Migrations
        • Getting Started
        • Installing the Hasura CLI
        • Configuration Files
        • Hasura Migration Principles
        • The Migration file format
        • Development
        • Hasura Seed Data
        • Running the Hasura Cluster Locally (video)
        • Create a migration: Exercise 1 (video)
        • Create a migration: Exercise 2 (video)
        • Latest hasura-cluster features
    • User Management
    • Authentication
      • Authentication Architecture
      • DynamoDB & Cognito
      • Secrets Manager & Cognito
      • Hasura & Cognito
      • React & Cognito
      • Flask API & Cognito
      • Single Sign-On with CTM
    • Code organization
    • API
      • Configuration Files
      • Testing
      • User Management API
    • Maps and geospatial data
      • Access tokens and API keys
      • Map libraries
      • Map data
      • Map styles
      • Map layers and basemaps
      • React patterns
      • V1 Archive
        • Map libraries
        • Map data
        • Map custom hooks
        • Map styles
        • Map layers and basemaps
    • UI access control
    • Design system
      • Branding
      • Component styles
      • Text content
    • Activity Log
      • Architecture
      • GitHub Actions and Deployment of Updates
      • Hasura Event Logs and Truncate Cron Job
      • Authentication
  • See also
  • Get Moped support, report a bug, or request an enhancement
  • Data & Technology Services
  • Github repository
Powered by GitBook
On this page
  • 🧰 Initial setup
  • Clone the repo
  • Install Docker & Docker Compose
  • Install the Hasura CLI
  • Install nvm
  • 🛵 Running Moped
  • Update your local code
  • Open Docker
  • Start the database
  • Start the application
  • Switching branches
  • 🛑 When you're finished

Was this helpful?

  1. Product Management

Local testing

Many pull requests can be tested by using the Netlify link in the PR, but you must run a branch locally to test branches/releases that include changes to the database.

PreviousUser analyticsNextRelease process

Last updated 1 year ago

Was this helpful?

🧰 Initial setup

Clone the repo

If you don't have one, create a directory for Github repos: $ mkdir ~/Documents/GitHub

From your repo directory, clone Moped: $ git clone https://github.com/cityofaustin/atd-moped

Install Docker & Docker Compose

Follow the docker documentation to install docker in your system.

  • For Mac:

  • For Windows:

Install the Hasura CLI

Run $ curl -L https://github.com/hasura/graphql-engine/raw/stable/cli/get.sh | bash.

This will install the Hasura CLI in /usr/local/bin. You might have to provide your sudo password depending on the permissions of your /usr/local/bin location.

Install nvm

We use (nvm) to keep our node versions in sync with our environments.

  1. Install the Xcode Command Line Developer Tools: $ xcode-select --install

  2. Install nvm according to the .

  3. From the moped editor directory, activate the current node and npm version required for this project: $ nvm use

  4. Install dependencies: $ npm install

🛵 Running Moped

Update your local code

From the atd-moped directory, run $ git fetch to download the most recent code, files, and branches from Github. If you want to test a branch other than main, run $ git checkout <branch-name>.

You may be notified that your local code is behind the current state of the branch. Use $ git pull to update.

Open Docker

You don't need to actively do anything with Docker Desktop, but you need the application running.

You can disable the default "Open Docker Dashboard when Docker Desktop starts" setting if you don't want a window to pop up. Instead, just click the Docker logo in the Finder menu bar to see the green dot and "Docker Desktop is running" status.

Start the database

  1. Start the cluster: $ ./hasura-cluster start

  2. Optionally, open the Hasura console in your browser: $ ./hasura-cluster console or $ hasura console

Start the application

  1. In a second Terminal tab, from the moped editor directory, run $ npm install to ensure that any new packages are installed.

  2. Start the server: $ npm run start

  3. To login, locate the username and pw in the DTS password store under the named "Moped Test Editor (local, staging, prod)."

Switching branches

When testing multiple PRs in a sitting, you need to run $ ./hasura-cluster restart every time you check out a new branch. You shouldn't need to re-run $ npm install or log out of Moped.

🛑 When you're finished

  1. In the Terminal tab running the application, end the npm process by typing Ctrl+C.

  2. In the Terminal tab with the database, close the Hasura console (if running) by typing Ctrl+C. Then stop the database: $ ./hasura-cluster stop

Our tool provides for the Hasura commands we need frequently in Moped.

Open in your browser.

https://docs.docker.com/docker-for-mac/install
https://docs.docker.com/docker-for-windows/install
Node Version Manager
directions on their website
hasura-cluster
shortcuts
https://localhost:3000/moped