Skip to main content
This guide will help you quickly set up vLife DGO for local development and verify that the application is working correctly.

Prerequisites

Before you begin, ensure you have the following installed:
  • Node.js (v16 or higher recommended)
  • MySQL (v5.7 or higher)
  • Git for cloning the repository

Quick Setup

1

Clone the Repository

Clone the vLife DGO repository to your local machine:
git clone <repository-url>
cd vlife
2

Install Dependencies

Install all required npm packages:
npm install
This will install the following key dependencies:
  • Express.js for the web server
  • MySQL2 for database connectivity
  • Handlebars for templating
  • Passport for authentication
  • Puppeteer for PDF generation
3

Configure Environment Variables

Create a .env file in the root directory with your configuration:
.env
PORT=4001

# Database Configuration
DB_HOST=localhost
DB_PORT=3306
DB_USER=root
DB_PASS=your_mysql_password
DB_DATABASE=vlifedgo_db

# Security Key
SUPER_KEY=key_cecc
Replace your_mysql_password with your actual MySQL password. The default port is 4001.
4

Set Up the Database

Create the MySQL database for vLife DGO:
CREATE DATABASE vlifedgo_db CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
Make sure the database name matches the DB_DATABASE value in your .env file.
5

Start the Development Server

Run the application in development mode with auto-reload:
npm run dev
You should see:
vLife v3 running on 4001
6

Verify Installation

Open your browser and navigate to:
http://localhost:4001
You should be redirected to the authentication home page at:
http://localhost:4001/auth/home
If you see the vLife DGO interface, congratulations! Your installation is successful.

What’s Next?

Now that vLife DGO is running, you can:

Troubleshooting

If port 4001 is already occupied, change the PORT value in your .env file:
.env
PORT=4002
Then restart the development server.
Verify that:
  1. MySQL is running: sudo service mysql status
  2. Your credentials in .env are correct
  3. The database vlifedgo_db exists
  4. Your MySQL user has proper permissions
Delete node_modules and reinstall:
rm -rf node_modules package-lock.json
npm install

Build docs developers (and LLMs) love