MySQL, Express, React, Node.js, JWT, Bcrypt, Cookie-Parser, TailWindCSS
/home/sevenkits/WebHosting/VanaByteWebsite/frontend/build
cd frontend
npm install
(since node_modules are not in repo need to download them according to package.json)FRONT END DEVELOPMENT:
npm start
(for development)FRONT END PRODUCTION:
npm run build
(for production)sudo nano /etc/apache2/sites-available/000-default.conf
(set apache to run your build folder now see below)<VirtualHost *:80>
ServerName vanabyte.com
DocumentRoot /home/sevenkits/WebHosting/VanaByteWebsite/frontend/build
<Directory /home/sevenkits/WebHosting/VanaByteWebsite/frontend/build>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
Alias /phpmyadmin /usr/share/phpmyadmin
<Directory /usr/share/phpmyadmin>
Options Indexes FollowSymLinks
DirectoryIndex index.php
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
cd backend
DB_HOST=localhost DB_USER=your_username DB_PORT=3306 DB_PASSWORD=your_password DB_DATABASE=your_database
npm install
(since node_modules are not in repo need to download them according to package.json)BACK END DEVELOPMENT:
npx nodemon index.js
(for development)BACK END PRODUCTION:
npx pm2 start index.js
(for production running)npx pm2 list
(view backends running)npx pm2 logs 0
(view logs for specific backend id, use CTRL-C to exit logs)npx pm2 stop 0
(stop running specific backend id)npx pm2 start/restart 0
(start running specific backend id)npx pm2 delete 0
(delete specific backend id)(alternatively just use npm list
)
FRONTEND:
- none
BACKEND:
- npm install dotenv (used for db info)
- npm install express
- npm install mysql2
- npm install cors
- npm install pm2
- npm install node
- npm install nodemon
FrontEnd (Vite) 0. https://tailwindcss.com/docs/guides/vite (Vite)
FrontEnd (React) 0. https://tailwindcss.com/docs/guides/create-react-app (React)
npx create-react-app .
npm install -D tailwindcss
npx tailwindcss init
do other stuff in linked tutorial dev: npm start
//npm install -D prettier prettier-plugin-tailwindcss