in This Tutorial you will Learn " How To install Svelte ( JavaScript Framework ) With Apache On Rocky Linux 8.5"
Svelte is a front-end, open-source JavaScript framework for making interactive webpages.
Apache is the most widely used web server software.
Homepage -https://svelte.dev/
Github - https://github.com/sveltejs/svelte
_________________________________________________________________________________________
Server - Os: Rocky Linux 8.5 64Bit | IP -192.168.1.60 |Hostname - server.yourdomain.com
_________________________________________________________________________________________
cat /etc/system-release ; hostname ; hostname -I ; sestatus ; dnf groupinstall "Development Tools" -y ; dnf module enable nodejs:14 -y ; dnf install nodejs npm httpd -y
npx degit sveltejs/template my-svelte-project
cd my-svelte-project ; npm install
npm run dev
npm run build
http://localhost:8080
nano /lib/systemd/system/sveltejs.service
[Unit]
After=network.target
[Service]
Type=simple
User=root
WorkingDirectory=/root/my-svelte-project
ExecStart=/usr/bin/npm run dev
Restart=on-failure
[Install]
WantedBy=multi-user.target
systemctl daemon-reload ; systemctl start sveltejs ; systemctl enable sveltejs ; systemctl status sveltejs
nano /etc/httpd/conf.d/example.conf
<VirtualHost *:80>
ServerAdmin admin@example.com
ServerName www.example.com
ErrorLog /var/log/httpd/error.log
CustomLog /var/log/httpd/access.log combined
ProxyRequests On
ProxyPass / http://localhost:8080/
ProxyPassReverse / http://localhost:8080/
</VirtualHost>
firewall-cmd --permanent --add-service={http,https} ; firewall-cmd --reload ; echo "192.168.1.60 www.example.com" >> /etc/hosts
systemctl restart httpd ; systemctl enable httpd ; systemctl status httpd
www.example.com
_________________________________________________________________________________________
Saturday, February 5, 2022
How To install Svelte ( JavaScript Framework ) With Apache On Rocky Linux 8.5
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment