Quick Start

Welcome to the Nexus Framework documentation. Here you will learn how to quickly bootstrap an application and configure your backend.

Please Note

Ensure you have Node.js version 18.0 or higher installed. Root or sudo privileges are required to configure the Nginx web server.

CLI Installation

The fastest way to get started is by using our command-line interface. Open your terminal and run the following command:

npx create-nexus-app@latest my-project
cd my-project
npm run dev

Nginx Configuration

To deploy your application on a production server, we recommend using Nginx as a reverse proxy. Below is a basic example of the /etc/nginx/sites-available/nexus configuration file.

server {
    listen 80;
    server_name example.com;

    location / {
        proxy_pass http://localhost:3000;
        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;
    }
}

After creating the configuration file, don't forget to create a symlink to the sites-enabled directory and restart the Nginx service:

sudo ln -s /etc/nginx/sites-available/nexus /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl restart nginx

What's Next?

Now that your application is up and running, you can proceed to learn about routing basics or setting up a database connection.