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 pm2
Importing Codebase
In your SSH Terminal
, type the following command to create a directory:
terminal
mkdir /var/www/nextjs
Navigate 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 build
Start the Application
Start the application using PM2:
terminal
pm2 start npm --name "your-app" -- start
Save PM2 Configuration
Save the PM2 configuration to survive server restarts:
terminal
pm2 save
pm2 startup
Monitor the Application
You can monitor your application using:
terminal
pm2 monitor
Framecast AI is ready and fully functional to use now.