What is Modulus?
How do I deploy a Node.js application?
My application isn’t running, what happened?
I don’t have an application to start with, is there one I can try?
What is a Servo?
How much will this cost?
How many servos can I use?
What can I use my initial account credit for?
Can I read and write files to the file system?
How do I use MongoDB with my application?
How do I use Redis with my application?
What version of Node.js is my application running on?
Can I view my console logs and standard output?
Can I use a custom domain with my application?
Is it possible to use HTTPS (SSL) with my application?
How many applications can I run?
What port does my application need to run under?
Can I use ImageMagick?
What cloud providers are used to host my application?
Can I send emails from my app?
Do you charge for bandwidth?
Modulus provides tools and resources for developers. This includes a best in class scalable hosting solution, integrated MongoDB, and statistics that are unmatched in the industry.
Your Node.js applications can be run with the click of a button through the web portal or by using the simple Modulus command line tool. You can also instantly spin up a Mongo database for your applications and access it from anywhere.
There are two ways to deploy your application to Modulus. The first is by logging into the web portal, accessing your project dashboard and uploading a zip file with the contents of your project. The second is by using the Modulus command line tool. Both of these methods are documented in the Getting Started Guide.
There are a few common issues that you should check if your application is not working. The first place to look is in your logs, which can be viewed from the project dashboard or by using the command line tool.
$ modulus project logs
If the logs contain the text, “ERROR: Main file not found”, this means we could not find the correct Node.js main file when attempting to start the application. This can be remedied by updating your package.json file to include the main property or by naming your main file app.js, main.js, index.js, or server.js.
If the logs contain something like “Error: Cannot find module xxxxx” then the most likely cause is that the package.json file is not included in your project or it’s missing a required dependency.
If your application simply does not respond to requests but you think it’s setup correctly, then the most likely culprit is that the application is listening on the wrong port. This can be fixed by updating the application code to use the PORT environment variable (process.env.PORT). This will usually look something like “app.listen(process.env.PORT || 3000);”. In this case, 3000 is the port to use when the PORT variable is not available, like when you’re running locally.
The Getting Started Guide has sample fixes for all of these common issues.
Yes, we have a sample application that can be downloaded from Github and deployed.
A Servo is an isolated piece of computing power. These are used to run your applications and are the basis of cost calculations for hosting. You can scale an application by increasing the number of servos that it is running on. Each servo gets 396MB of memory and 512MB of swap space.
Modulus charges for the number of servos you are using, the number of documents in your MongoDB, and how much persistent storage is used. However, there is a free amount of documents available for MongoDB and a free amount of persistent storage. You can read more about the billing on the pricing page.
For the time being, you are allowed to use to up 10 servos per project. If you need more than 10 for a single application please contact us.
Credits can be used for any service on Modulus.
Yes, your application may write files to two locations.
Modulus is one of the only platforms that offers a persistent storage solution. The first location you may write files acts like network attached storage location. This means any files you write to this location will be instantly available to all instances of your application no matter how many servos it’s running on. You can get this location from the CLOUD_DIR environment variable.
The second directory is an ephemeral location that will be emptied when your application goes offline or restarts. Any files in this location will not be shared between instances of the application if it is scaled to multiple servos. You can get this location from the TEMP_DIR environment variable.
Luckily we wrote a guide on getting started with MongoDB that you can read over to help out.
At this moment Modulus does not offer Redis as a core offering, however it is planned for the near future. In the meantime we recommend checking out one of these services: Redis To Go, openredis, or Redis Cloud.
All Modulus projects have the option to use Node versions 0.2.0 and up - this includes both stable and unstable releases. To specify the Node version your project uses, you need to define a Node engine version in your package.json.
You may view your logs on the project dashboard through the web portal or by using the command line tool’s “modulus project logs” command.
Yes, you can add a custom domain through the Administration section of the project dashboard. We allow you to add root domains (naked domains) or subdomains. You can read more about custom domains in our guide.
Modulus offers two styles of SSL support. Both are available on all projects for free.
The first is piggyback SSL on the *.onmodulus.net domain. This means any project can simply use SSL through its onmodulus.net url with no extra setup or configuration.
The second is custom SSL using a custom domain. You provide your SSL certs and we take care of the rest.
You can dig into using these features more in the SSL guide.
For the time being, each user can have up to 50 projects. If you need more, please contact us.
8080 but we recommend using the PORT environment variable (process.env.PORT).
Yes, ImageMagick is installed on every servo and is available by default to all projects and applications. We recommend node-imagemagick.
We currently host all customer applications on Amazon AWS in us-east-1. This is the same region as many other cloud services, which will help reduce latency with many 3rd party services. We also are using Microsoft Azure in US East and US West regions to store statistics, however this does not affect customer applications.
There are no hard limits or extra charges for bandwidth.