Getting Started with Moose
Viewing typescript
switch to python
- 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)
Open Docker Desktop if its not already running.
Don't have it
installed? Download Docker
here (opens in a new tab)
Create and Activate a Virtual Environment
Navigate to the directory where you want to create your Moose project, then run:
python3 -m venv .venv && source .venv/bin/activate
Install Moose CLI
In your virtual environment, run:
pip install moose-cli
Create an Empty Moose Project
moose-cli init moose-github-analytics python --empty
npx create-moose-app@latest moose-github-analytics ts --empty
This Moose CLI helper function creates a new Moose app with the proper conventions for the basic directory structure. This includes an /app
folder which contains the heart of your new Moose app. Each sub-folder hosts one type of Moose primitive.
cd
into your Moose Project and Install Dependencies
cd moose-github-analytics && pip install -e .
cd moose-github-analytics && npm install
Run the Moose Development Server
moose-cli dev
npm run dev
You must be in your project directory in order to start the development server
You should expect to see the following printed to your terminal:
You have set up a Moose instance at http://localhost:4000
It provides the following infrastructure:
- OLAP Database (Clickhouse) to store and analyze your data
- Streaming Data Platform (Redpanda) to buffer and transform incoming data
- Ingestion and Consumption APIs to get data in and out of your database
As you develop, the dev server automatically updates with your latest changes, providing a real-time view of your Moose application locally.
Open Project in IDE
With VSCode, for example:
code .
Click 'Install' on the pop-up window located in the bottom right corner of the screen. Moose will automatically configure these extensions for you.