Additional Commands for MERN Stack, MySQL, and PM2
MERN Stack
Create React App
npx create-react-app my-app
Express Generator
npm install -g express-generator
express --view=ejs my-express-app
MongoDB Commands
mongo
Start MongoDB shell
show dbs
List all databases
MySQL
Login to MySQL
mysql -u username -p
Create Database
CREATE DATABASE dbname;
MySQL Import
mysql -u username -p dbname < data.sql
PM2 (Process Manager for Node.js)
Install PM2
npm install -g pm2
Start Application
pm2 start app.js
List Processes
pm2 list
Monitor Logs
pm2 logs
Restart Process
pm2 restart 0
0 Comments