The best development environment for monday apps... your opinion and setup

I am wondering how you develop and test monday apps (specially integration features). To start the discussion I will share my setup and curious to know about your best practices.

I use a windows client but wanted to develop on an Ubuntu system. Therefore I am using a Plesk server with Ubuntu (from 15 US/month @ different hosting providers) which also hosts my Wordpress sites. Plesk (Phusion Passenger & nginx will take care of running multiple domains on a single IP and do the caching) and evrything is safeguareded with firewall and mod security.

On this Plesk server I configured 2 subdomains mondaydev and mondayapps together with 2 backend databases I need to support my apps (eg to keep tokens).

On my Windows machine I use VSCode with a remote (ssh) connection to my mondaydev subdomain. So anything I change in VSCode (on the Windows PC) is really changed directly on the dev server. My VSCode is connected to Github, so if I am happy with a ā€œreleaseā€ I commit changes and push it to Github.

Plesk has a very nice feature called Node.js, where you have options to build and run your Node app (you donā€™t need to do npm build / run etc). Because it is running on a hosted server with a public IP, I donā€™t need to bother about ever changing IP addresses and ngrok tunnels.

In monday.com I have apps (starting with DEV) that uses authorization and run URL from the mondaydev subdomain which is serving the endpoints.

On the production subdomain my Plesk subdomain is connected to the same Github account, and Plesk can simply pull (in that subdomain) the latest version from Github and all I need to do is build and run.

I have a clean package.json file with no npm command in it as Plesk is taking care of this. The Node.js extension of Plesk also enable you to set environment variable without the need of a .env file, so you donā€™t have to bother about securing the .env file holding your client secret etc.

There is only one little thing I would like to see in monday and that is to copy a feature (frontend of an integration) from one monday app to another. Currently my production app is public and my development app is private. Therefore I need to ā€œrebuildā€ or ā€œreconfigureā€ the frontend side of the app in the production version.

This setup works very good for me and I hope some of you benefit from this idea. Also like to know how you are handling testing vs. production.

5 Likes

That is really amazing ! Thanks for sharing!

1 Like

Hey there @basdebruin - thanks for starting an important conversation here and I do hope other team members will join in and share their experience as well :slight_smile: Sometimes, it takes one person to start a journey that many others will be able to follow and I appreciate the opportunity this post creates.

@TMNXT-Dev thank you as well for acknowledging the effort here! :slight_smile: That said, whatā€™s your setup like? Is there anything youā€™d like to share that you find works well for you?

-Alex

1 Like

Hi @basdebruin I have a question on this one. Iā€™m currently using the template from the quickstart-integrations which includes setting up a development environment with ngrok from @dipro 's webinar. However, each time Iā€™m saving the code after changes, the web server seems to crash with the following message:

[nodemon] app crashed - waiting for file changes before startingā€¦
[nodemon] restarting due to changesā€¦
nodemon] starting node ./src/app.js
events.js:288
throw er; // Unhandled ā€˜errorā€™ event
^

I need to relaunch my server thus generating a new ngrok URL and I have to update my integration recipes, which is quite annoying.

Did you also run into this issue?

Regards,

Freek

Hi @freek-gcompany Not exactly the same issue, but (in general) the webserver (Apache) has to restart when you make changes to your code. When you run an ngrok tunnel to your local PC this will result in a new URL and thus the need to reconfigure your app on the client side.

I am using a setup with an server hosted on the Internet with Plesk/NodeJS/Apache/nginx. When I make changes to the code it also restarts but you will not notice that because the URL is a public URL hosted on the internet.

Does that make sense?

Hi @basdebruin not entirely, but thatā€™s my probably on my end :slight_smile:

Iā€™m using a server with node.js (based on the quickstart-integrations) where Iā€™m used that whatever code change I make locally is immediately reflected by the site thatā€™s hosted by that code (similar to what youā€™re describing with the SSL connection but locally on my machine).
Now, with ngrok (maybe thatā€™s the cause), whenever I make a code change I get the aforementioned error, causing me to relaunch the server which changes the ngrok URL and thus I need to update my recipe.

The setup I run for production, hosting the endpoint on Google Cloud Platform causes me to push my code to a github repository and then redeploying the cloud function to reflect the most recent source code. The endpoint always stays the same but the redeploy takes a couple of minutes thus drastically decreasing my development speed.

I suppose what Iā€™m looking for is the best way to run a nodejs server which immediately reflects my latest code changes while keeping the same endpoint across different versions.
Any suggestions on such a setup are more than welcome!

Hi @freek-gcompany

Good chance that I misunderstood you :slight_smile:. The setup I described (hosted Plesk/nodejs) is for me perfect for development. Whenever I make a change in my code (remember I develop on my local Windows machine with VScode/ssh connection to my server) I hit the Restart node button in Plesk and the new code is active in a matter of 2 seconds without the need for any reconfig due to ngrok. I simply do not use ngrok at all.

I love your setup and I am trying to replicate it but running into issues. Remote WSL does not seem to be working for me. I am used to developing through Remote-WSL with VS Code. But this setup with Remote-SSH VS Code extension uses the Windows 10 host for WSL through Powershell. I installed Open SSH client in powershell, generated keys and put them in the authorized keys on my Digital Ocean server. I can connect via SSH in powershell to the remote server but when I try to connect via the Remote-SSH VS Code extension it does not work. Do you have a tutorial on how you set this up? Any help is much appreciated.

Solved my own problem. In case this helps any one else out, I had to open VS code with Run as Administrator and then ctrl+shit+p for command palette in VS Code, then Remote-WSL Connect current window to host in order to connect using the Admin VS Code instead of opening a new instance for the connection.

Hi @basdebruin ,

Thank you for starting this topic. Iā€™m looking right now for the best possible setup for our monday integration.

My setup is currently this:

  • Monday to monday integration app in order to use the graphQL API (nodeJS with typescript)
  • Persistence is a MySQL DB for user tokens
  • I develop locally in VSCode & run in docker compose for testing. I control the ngrok tunnel myself (starting it manually through command line), hence I do not need to change URL when I restart my docker compose.
  • For now i deploy my app on a very small AWS EC2 instance, running inside a docker container, behind NGINX.
  • the MySQL container is replaced by RDS instance in prod.

Iā€™m wondering if this is enough, particularly for productionā€¦ Iā€™m thinking an orchestrator manager like K8s would be better, but I have the feeling this is a little bit overkill.

@basdebruin , do you have a lot of clients that uses your app in production ? How does it scales ?

hi @guidou4

Since the original post I changed some infra. Now running 3 environments, Dev, Test and Prod. The Prod server is a AWS Lightsail 2 VCPU/8GB Plesk/Ubuntu servicing 1.500+ accounts over 15+ different apps. Measured over a 20-day period this is making approx. 400K API request per 24h.

1 Like

I develop in Windows as well, but utilize WSL with Ubuntu. (I am planning though to abandon windows soon, possibly for some flavor of linux. Though saving for a new MacMini if they come out with an M2 based one specā€™d between the current mini and the mac studio)

Since I deploy to AWS, I use the aws-cdk to define my infrastructure, etc. (Iā€™m not going to go into specifics, but i will say its progressive.)

using ā€œcdk watch stackname --profile=dev -e -hotswapā€ I can view an only slightly delayed log stream from my app. As I make and save changes, the new code gets deployed automatically (to devā€¦ NOT PRODUCTION). Very similar to running nodemon locally with ngrok, except the code changes get pushed to aws. Not quit as fast as full remote development would be, but also pretty transparent.

Beyond that, I do everything in vscode with a terminal on another display for the logs to flow by (because the vscode integrated terminal just needs too much space for that to be useful).

@basdebruin if youā€™re still active here, please give some sign. I really need your help. Iā€™d like to ask about some more details about these environments because now weā€™re working on some plugins to monday.com and want to prepare some testing environments or at least check what are the possibilities. I hope, youā€™re still on this forum. :slight_smile: Greetings

Hi Anna

Yea, I am still on the forum. In the mean time I did make some changes to the development environment.

Thank you for the reply. Is it possible for us as integrationsā€™ creators to create a testing environments thatā€™s exactly like monday.com? Or some local environment? Did I understand right that you have such environments? I asked monday support directly but they suggest to test integrations on their website before publishing them.

I develop all integration in abc.monday.com and I have another account (free) for testing while in production called xyz.monday.com

In abc.monday.com I set the baseURL to dev.mydomain/myapp. I can test inside abc.monday.com and the backend runs isolated at dev.mydomain/myapp

When ready for user testing I:

  • change the baseURL to test.mydomain/myapp
  • promote the app to live
  • chare the apps installation link with the testing customer

For continuous development I create a new minor version and change the base URL back to dev.mydomain/myapp

etc. etc.

Could you explain how you change the base URL?

Unfortunately, I canā€™t find this view on monday.com. Where is it?

avatar > developers > your app > your integration feature