Getting Started With devmon
With devmon you can manage your development environment easily.
This is how it’s done:
Step 1: Install devmon
Download and Install devmon from here
To install devmon, all you have to do, is to drag devmon icon to your apps folder.
Step 2: Writing up a demo server
For the example, we will create an empty node.js project, this is just for the example, any programming language will do.
$ mkdir example
$ cd example
$ npm init -y
$ npm i express
$ touch index.js
Now edit the index.js file with your favorite editor:
const express = require('express')
const app = express()
app.get('/', (req, res) => res.send('Hello World!'))
app.listen(3000, () => console.log(`Example app listening!`))
Step 3: Creating a devmon project
Open up devmon, and click on New Project
Select the example folder and write up the project name.
Step 4: Configuring your project
Click on the Edit button in devmon project manager
Add a new process to the project process list
Now we will need to setup the process parameters
The each process has a few process parameters:
Process Name – A friendly name that you will recognise in your process list
Workdir – a directory that the command will be invoked in. this path is relative to the project file that you created in the Step 3.
Start Mode – Will give the option to start the process immediately with the project, or manually (start on demand)
Is Deamon – You can read about this option here
Command – this is the command that runs when the process start.
For this example, we will use these settings:
These settings will manually start a node process, running index.js, that will start my server.
Click on save, and we are done!
It is considered best practice to save the devmon project file along with your source code, and add it to your version control.
This way, all changes that are made to devmon, can be instantly used by all workers on this project.
Step 5 – Have Fun
Now let’s run our server:
Just click on the “Start” button, and you are up!
Now Click on the menu bar icon, and click on the play button:
And…. We are up and running
try and point your browser at localhost:3000, and you can see our app is running.
Now let’s go through some more features in devmon.
The Stop Button – Will stop the current process
The Restart Button – Will restart the current process
The “Show Logs” Button – Will open a terminal window, that will tail the logs from your process
That’s it for now 🙂
Here are some relevant articles that might be useful for you:
How to use webpack watch mode with devmon
How to use npm and package.json with devmon