Skip to content

hongfeij/real-time-svg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SVG Synchronizer Tool

Overview

The SVG Synchronizer Tool provides real-time synchronization of SVG files between a producer and a server. When the producer generates a SVG file in a designated folder, it sends them to the server. The server receives the file, updating or creating the SVG file with the received content.

Setup and Installation

Prerequisites

  • Node.js and npm
  • .env file with the required environment variables placed in the root directory

Environment Variables

  • SERVER_URL: The URL of the server including port
  • SRC_SVG_FOLDER_PATH: Relative path to the folder watched by the producer for SVG files
  • DEST_SVG_FOLDER_PATH: Relative path to the folder where the server will save SVG files
  • SERVER_PORT: Port on which the server listens

Installation Steps

  1. Clone the Repository

  2. Update .env file

  3. Install Dependencies:

    npm install
  4. Run the Server:

    node src/server.ts

or Run the Producer (in a separate terminal window): sh node src/producer.ts

Usage

  1. Place SVG files into the folder specified by SVG_FOLDER_PATH in your .env file.
  2. The producer detects any new or modified SVG files and sends them to the server.
  3. The server will save or overwrite these SVGs in the folder specified by DEST_SVG_FOLDER_PATH in your .env file, retaining the filename.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published