← All topics

What are dev environments?

Source code needs a supporting setup before you can run it. A development environment brings together the tools, runtimes, services and settings your project needs.

What a project needs beyond its source code

A development environment is the setup you use to edit, run and check code. It includes an editor, the runtime for your programming language, installed dependencies and any services the application talks to. For a backend, that might include a local database.

The source code does not describe all of this on its own. Which runtime version does the project expect? How do you start the database? Where does the application get its address? Keeping those details with the project helps the next person set up their environment.

Why an application runs on only one computer

A different database port can be enough to break a connection. Different runtime versions or a missing environment variable can also change how an application behaves. Comparing the environments is a useful first step before changing the application code.

Development and production do not need identical values everywhere. A local database address points to the service used for development; the server needs the address of its own database. Each environment needs the right values and a clear place to maintain them.

Runtime versions and start commands in MainPath

A MainPath repository records its runtime versions in .tool-versions. mp bootstrap installs them without starting the application, while mp doctor shows which tools are missing. Run mp run-local from the application repository to start it. For a backend, this also starts its local Docker services. See Local development for the workflow.

Generated settings live in env/*.generated.env. Add your own values to the appropriate files under env/*.custom.env, then restart the application. Environment variables explains which files belong to each environment.

Working on your computer or in a workspace

Your development environment can live on your computer or in a provided workspace. MainPath workspaces are based on Docker images. The project revision, required services and appropriate configuration remain part of the setup wherever you work.

Starting the application locally gives you an initial check. The pipeline then checks the change against the project’s configured checks and build.

Thank you for your request

We have received your request and will get back to you as soon as possible.

Would you like to talk to us directly?

Choose a time here for an introductory call with Robin.

Open the calendar in a new tab