Deploy application on Windows instance
Deploy application on Microsoft Windows Server 2022 instance
- NPM stands for Node package manager is a tool to create and manage Javascript programming libraries for Node.js. Using npm init to initialize the project will generate a sample package.json file.
npm init

- Complete the application’s information configuration

- Next we do the dependencies installation
npm install express dotenv express-handlebars body-parser mysql
- express
- Dotenv
- express-handlebars
- body-parser
- mysql

- Use Visual Studio Code to open the source code and create a .env file used to configure the database.
DB_HOST = 'localhost'
DB_NAME = 'DB_NAME'
DB_USER = 'root'
DB_PASS = 'password'
Since it is a practical lab, we use the root user with a blank password. When you build or install a database-driven application, you typically create a database service user for that application and avoid using the root account for anything but database administration. data.

- Restart the Express server. Use Nodemon to save time.
npm install --save-dev nodemon

- Start the local server
npm start

- Open a browser and go to localhost:5000

- Add user information to the database

- Access the application interface again
