Deploy AWS User Management Application on Windows Server

Deploying the AWS User Management Application on Windows Server 2025

ℹ️ Information: This guide walks you through deploying a Node.js-based user management application on Windows Server 2025. The application uses Express.js as the web framework, Handlebars for templating, and MySQL for data storage, providing a complete CRUD interface for managing AWS user information.

Setting Up the Node.js Project

  1. Initialize the Node.js project using NPM (Node Package Manager):

    npm init
    

    NPM initialization process

  2. Complete the application configuration by providing the requested information:

    • Package name
    • Version
    • Description
    • Entry point (app.js)
    • Other project metadata

    Project configuration details

Installing Required Dependencies

  1. Install the necessary Node.js packages for the application:

    npm install express dotenv express-handlebars body-parser mysql
    

    These packages provide the following functionality:

    • express: Web application framework
    • dotenv: Environment variable management
    • express-handlebars: Templating engine
    • body-parser: Request body parsing middleware
    • mysql: MySQL database connector

    Dependencies installation process

! If high severity vulnerabilities (x high severity vulnerabilities) still remain after running npm update and npm audit fix, it is recommended to remove and reinstall nodemon using the latest version:

  • Remove the current nodemon package: npm uninstall nodemon

  • Install the latest version of nodemon as a development dependency: npm install nodemon@latest --save-dev

  • (Optional) Verify vulnerabilities again: npm audit

Audit and fix vulnerabilities

Configuring Database Connection

  1. Open the project in Visual Studio Code and create a .env file to store database configuration:
    DB_HOST=localhost
    DB_NAME=awsuser
    DB_USER=root
    DB_PASS=
    

🔒 Security Note: For production environments, avoid using the root database user. Instead, create a dedicated database user with limited permissions specific to the application’s needs. The root account should be reserved exclusively for database administration tasks.

Environment configuration file

Running the Application

  1. Start the application server:

    npm start
    

    Application server startup

  2. Access the application by opening a web browser and navigating to: http://localhost:5000

    Application homepage

Testing CRUD Functionality

  1. Add a new user by completing the form with user information:

    • First Name
    • Last Name
    • Email
    • Phone
    • Comments (optional)

    Adding a new user Adding a new user

  2. View the updated user list in the application interface:

    User list with newly added user

💡 Pro Tip: For a production deployment, consider configuring Windows Firewall to allow inbound traffic on port 5000, or set up a reverse proxy using IIS to forward requests from port 80 to your Node.js application.