Getting Started
Quick start

Requirements

You will need the following dependencies installed on your machine before you can use MooseJS:

  • Git (opens in a new tab)
  • NodeJS (opens in a new tab)
  • Docker (opens in a new tab)
  • macOS or Linux (Windows is not supported at this time, but may work using WSL Windows Subsystem for Linux)

  • Quick Start

    The easiest way to get started with a new MooseJS application is to use create-moose-app. This will automatically create a project folder for you, and initialize a skeleton MooseJS app with the entire project structure you need to get started.

    Terminal
    npx create-moose-app my-moose-app

    Explore the docs to learn more about your project structure (opens in a new tab) or the architecture of your new app (opens in a new tab).

    Run your Moose app locally

    One of Moose's most powerful features is its ability to run a dev server on your local machine. As you're developing, Moose can run a local version of your entire end-to-end app, watch your project folder for any code changes, and automatically update your locally running app as you save changes. This lets you see and test changes in real time, before you push to production, just like if you were developing a web app.

    Let's try it out, by using the Moose CLI command Dev to start the local dev server. First, go to your project directory:

    Terminal
        cd my-moose-app
    💡

    Note you must have Docker installed and RUNNING locally to run Dev. Please make sure you start Docker first.

    There are a couple of different ways you can utilize the Moose CLI:

    The simplest method to run the CLI is via NPX. No extra installation is necessary for this method.

    Terminal
    npx @514labs/moose-cli dev

    Visit the Dev Console in the browser

    Now that your local dev server is up and running, you can visit http://localhost:3001 (opens in a new tab) to view your new MooseJS application console. From here you can inspect your application, browse the objects you've created, query and review data that you've sent into your Moose app, and more.

    As you develop your MooseJS application, changes you make to your codebase will be automatically reflected here in real-time.