Creating an interactive particles background with Particles.js
Back to top
Install Node.js five-server, a development server with live reload capability.
-
To install:
# Remove live-server (if you have it) npm -g rm live-server # Install five-server npm -g i five-server
-
To update (from time to time)
# Update five-server npm -g i five-server@latest
-
To run (from your local directory):
five-server . -p 8000
-
Plugins for popular code editors Some code editors have plugins which will spawn a simple server on demand.
- Five Server for Visual Studio Code.
- Live Server for Visual Studio Code.
- Live Server for Atom.
Back to top
-
Prerequisite:
- Make sure Node and NPM are installed on your computer. You can download both at nodejs.org (NPM is included in your Node installation).
- Please see
.nvmrc
file at the root ofparticlesjs-first-app
repo. - Using nvm, a Node Version Manager is recommended as it helps you manage and switch between different Node versions with ease. It provides a command-line interface where you can install different versions with a single command, set a default, switch between them, etc.
-
In GitHub click on the repository nammed particlesjs-first-app
-
Clone the repository locally. Run
git clone https://github.com/sctlcd/particlesjs-first-app.git
-
Install all modules listed as dependencies in package.json
cd particlesjs-first-app npm i
note: in this app
- particles.js - JavaScript library for creating particles
-
Install Node.js five-server, a development server with live reload capability.
-
To install:
# Remove live-server (if you have it) npm -g rm live-server # Install five-server npm -g i five-server
-
To update (from time to time)
# Update five-server npm -g i five-server@latest
-
To run (from your local directory):
five-server . -p 8000
-
Plugins for popular code editors Some code editors have plugins which will spawn a simple server on demand.
- Five Server for Visual Studio Code.
- Live Server for Visual Studio Code.
- Live Server for Atom.
-
Back to top
particlesjs-first-app live website is currently deployed on GitHub pages using the main
branch on GitHub. Once you have the project setup locally, you can proceed to deploy it remotely.
- In GitHub click on your repository to open it.
- Find the 'settings' tab and click on it.
- In the left menu select 'Pages'
- In Build and deployment section, under 'Source' choose a branch
Deploy from a branch
, under Branch chosemain
and/(root)
then press the Save button - Wait a couple of minutes and refresh the page then you will see a URL to your live site.
=> live link: https://sctlcd.github.io/particlesjs-first-app/
Back to top
- favicon.ico - Flaticon | copyright Eucalyp
Back to top