DEV Community

Cover image for Deploying a Job Application Web App Using Nginx
Abisha Berci J
Abisha Berci J

Posted on

Deploying a Job Application Web App Using Nginx

The goal was to take the production build of the application and configure Nginx to serve it as a web server 🚀

Technologies Used:
React
Vite
Node.js
Express.js
Nginx
Ubuntu / WSL

Deployment Process:

  1. Navigate to the project
    cd /mnt/d/Doctpro-main/Doctpro-main

  2. Install dependencies
    npm install

  3. Create the production build
    npm run build
    This generated the dist folder containing the optimized production files.

  4. Prepare the Nginx web directory
    sudo mkdir -p /var/www/doctpro
    Then copied the production files:
    sudo cp -r dist/* /var/www/doctpro/

  5. Configure Nginx
    The Nginx configuration was edited using:
    sudo nano /etc/nginx/sites-available/default
    The application was configured to be served from:
    /var/www/doctpro

  6. Verify the configuration
    sudo nginx -t
    The configuration returned:
    syntax is ok
    test is successful

  7. Start and verify Nginx
    sudo service nginx start
    Then:
    sudo service nginx status
    The server showed:
    Active: active (running)

  8. Test the deployed application
    curl http://localhost
    I also verified the HTTP response using:
    curl -I http://localhost
    The server returned:
    HTTP/1.1 200 OK
    Server: nginx

Deployment Flow:
React + Vite Application
↓
npm run build
↓
dist/
↓
/var/www/doctpro
↓
Nginx
↓
Web Application

What I Learned

This task helped me understand the practical deployment flow of a web application — from creating a production build to configuring Nginx and verifying that the server is correctly serving the application.

I also learned that Nginx is not just a web server; it can act as an important layer between users and web applications.

Final Result

The Job Application web application was successfully deployed and served using Nginx.

This task gave me hands-on experience with:

Build → Deploy → Configure → Verify → Serve 🚀

Nginx #WebServer #Deployment #React #Vite #NodeJS #ExpressJS #DevOps #WebDevelopment #Linux #ServerDeployment #SoftwareEngineering #LearningByDoing

Top comments (0)