Comment on page
Environment
Set up a development environment for Mainsail
At this point you should have already forked Mainsail into your repositories.
If that is not the case, go ahead and fork Mainsail now.
Copy the
.env.development.local.example
file and omit the .example
at the end.
The file is located in the root directory of the Mainsail project.Now edit the
.env.development.local
file to reflect your printers network configuration.Example: If the IP of your printer is
192.168.1.10
, modify it like this:# hostname or ip from the moonraker instance
VUE_APP_HOSTNAME=192.168.1.10
For Moonraker, you need to add localhost:8080 to the
cors_domains
section inside the moonraker.conf
:cors_domains:
*//localhost:8080
Port 8080 is the default port
npm
will serve the development server on.Make sure you run node >= 16
Open your preferred terminal application and navigate into the Mainsail root directory.
Run the following command to install all required modules and dependencies:
npm install
Afterwards run the following command to start a local development server:
npm run serve
Once the server is up and running, you can access Mainsail on
http://localhost:8080
.It is possible to develop Mainsail with a virtual printer running inside a Docker container.
We created a special project for that, which you can find here.
To use our Virtual-Klipper-Printer project, it is required to have Docker installed.
Below are some general resources on how to get Docker.
Last modified 10mo ago