Getting started with Node.js on Diploi
Node powers so much of the internet these days, and there are hundreds of services that can help you host Node apps, but none might be easier than Diploi. Bold claim, I know.
In this guide, I’ll show how easy it is to create a new Node app that is hosted online right from the start without ever touching YAML or annoying server setup wizards.
What you need
- A GitHub account, don’t have one yet? Click here https://github.com/signup
- A Diploi account, you can get a free Diploi account here https://console.diploi.com/
How to create an app with Node
- In the Dashboard, click Create Project +
- Under Pick Components, choose Node.js
- In Pick Add-ons, you can add one or multiple databases to your app
- Choose Create Repository, which will generate a new GitHub repo
- Lastly, click Launch Stack
This will create a new Project using Node.js, which will also start a new Development deployment, which will generate a SSL-protected URL for your app. You can start coding in the browser using our cloud IDE, or if you want to use your local IDE, you can connect via SSH using VS Code, Cursor, or any other IDE with support for remote development, so you can start working on your freshly created app without having to run it on your local machine.
Launching your Node.js app to Production
When your Node app is ready, you can launch a Production deployment following these steps:
- Open your Node.js Project’s dashboard:
https://console.diploi.com/<YOUR_USERNAME>/project/<YOUR_PROJECT_ID>
- Click Create Deployment +
- Select Production as the deployment stage
- Choose the cluster size depending on your needs
- Select the source branch you want to deploy from, such as
main
- Customize any necessary environment variables
- Click Create Deployment +
This will create a new deployment for your Node.js app, optimized for Production and ready to serve your users.
Configuring a custom domain for your Node.js app in Production
All deployments created on Diploi get an SSL-protected .diploi.me
URL to direct traffic. If you want to use a custom domain, all you need to do is:
- Head to the Options tab of the Deployment you want to customize, or go directly to:
https://console.diploi.com/<YOUR_USERNAME>/project/<YOUR_PROJECT_ID>/deployment/<YOUR_DEPLOYMENT_ID>/options
- In the Endpoints section, click to disable Use Auto‑Generated Endpoints
- A field will appear showing your current Diploi subdomain, and a checkbox to enable a custom domain
- Enable the checkbox and enter your custom domain name
- Scroll down and click Save Changes
- In your DNS settings, create a CNAME record pointing to edge.diploi.com
If you don’t have a custom domain, but want to customize the subdomain automatically generated by Diploi, eg. foo.diploi.me
to foobar.diploi.me
, you can do it from the same Options tab in your deployment, and after disabling the Use Auto‑Generated Endpoints option, an input field will show up showing your current subdomain, all you need to do is rename it to your new subdomain. When you are done, scroll down and click on Save Changes.
Modifying your domain usually happens instantly, but in some cases, it can take up to 30 minutes for DNS and SSL propagation to be completed.
Trying out Node for the first time?
If you haven’t worked with Node.js before and you would like to try it without having to set up folders, repos, or IDEs, you can start a Node project on Diploi in two ways:
-
- Starting a trial without registering an account
Go to https://diploi.com/#StackBuilder to launch a trial project, or visit the Node component page https://diploi.com/component/node
-
- Starting a Quick Launch Project if you have an account on Diploi
Create a new project and in the Repository section, select Quick Launch. This gives you a temporary environment to explore Node.js without connecting to a repo.
And that’s all! Now you know how to deploy new Node.js apps in seconds, without ever configuring a server or struggling with SSL certificates. Do you have questions and suggestions for us? Connect with us on Discord and drop us a message. We’ll be happy to talk with you! 😌
If you haven’t yet, sign up at Diploi and get 50 € in free credits.
References: