When you're ready to put your OstroJS application into production, there are a few things you should do to ensure it runs as smoothly as possible. We'll go through some fantastic beginning points in this article for ensuring that your OstroJS application is correctly deployed.

Server Requirements

There are a few system requirements for the OstroJS framework. You need make sure your web server has the following version of NodeJS >=12

Server Configuration


You may use the following configuration file as a starting point for setting your web server if you're deploying your application to a server that runs Nginx. Depending on your server's configuration, this file will most likely need to be modified.

server {
    location / {
            proxy_pass http: //localhost:8080; # your app's port
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection 'upgrade';
            proxy_set_header Host $host;
            proxy_cache_bypass $http_upgrade;

Debug Mode

The debug option in your config/app.js configuration file controls how much error information is presented to the user. This option is set by default to respect the value of the APP DEBUG environment variable contained in your.env file.

This value should always be false in your production environment. You risk exposing sensitive configuration data to your application's end users if the APP_DEBUG option is set to true in production.


If you set VIEW_CACHE to true, you will save time by not having to rebuild the view file for each request.