Giter Club home page Giter Club logo

backend's Introduction

Workflow Builder and Runner Backend

This Node.js application serves as the backend for a Workflow Builder and Runner system. It handles the creation, storage, and execution of workflows using MongoDB. Each workflow can consist of various tasks, such as data filtering, format conversion, and making HTTP requests.

Features

Create Workflows: Endpoints to define and save workflows in a MongoDB database. Retrieve Workflows: Fetch all stored workflows to be displayed on the frontend. Execute Workflows: Run selected workflows with uploaded files and perform defined tasks.

Technology Stack

Node.js: The runtime environment for the backend. Express: Framework used to build the web server. MongoDB: Database to store workflow definitions. Mongoose: ODM (Object Document Mapping) for MongoDB. Multer: Middleware for handling multipart/form-data, used for file uploads. dotenv: Module to load environment variables from a .env file.

Setup and Installation

Prerequisites Node.js installed on your machine. MongoDB running locally or remotely. A .env file in the root of the project with your MongoDB URI. Installing Clone the repository: git clone Navigate to the project directory:cd workflow-backend Install dependencies:npm install Set up environment variables:Create a .env file in the root of your project and specify your MongoDB URI: MONGO_DB_URI=mongodb://localhost:27017/your-database-name Run the server: npm start This will start the server at http://localhost:3001 by default.

API Endpoints

  1. POST /workflows - Create a new workflow. Body: JSON object representing the workflow structure. Response: JSON with the created workflow ID.
  2. GET /getworkflows - Retrieve all workflows. Response: Array of workflows with their IDs.
  3. POST /execute - Execute a workflow with an uploaded file. Form Data: fileData: The file to process. workflowId: ID of the workflow to execute. Response: Success message or error.

Development

Logging: The server logs important information to the console for debugging. Error Handling: Basic error handling is implemented to catch and respond to errors effectively.

backend's People

Contributors

vansh12345341 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.