Server Deployment
This guide covers deploying the application directly on your server. Make sure you have completed the database setup before proceeding.
To deploy the application on your server, follow these steps:
Install PM2 Process Manager
Install PM2 globally on your server:
terminal
npm install -g pm2Importing Codebase
In your SSH Terminal, type the following command to create a directory:
terminal
mkdir /var/www/nextjsNavigate to the above created directory via your server's File Manager. Upload the codebase to the directory.
Build the Application
Navigate to your application directory and build:
terminal
cd "/var/www/nextjs/source code"
npm install
npm run buildStart the Application
Start the application using PM2:
terminal
pm2 start npm --name "your-app" -- startSave PM2 Configuration
Save the PM2 configuration to survive server restarts:
terminal
pm2 save
pm2 startupMonitor the Application
You can monitor your application using:
terminal
pm2 monitor
Framecast AI is ready and fully functional to use now.