Trying to clone a repository & send it to the frontend with Node & Express

This page summarizes the projects mentioned and recommended in the original post on /r/node

SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
surveyjs.io
featured
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
  • Puts Debuggerer

    Ruby library for improved puts debugging, automatically displaying bonus useful information such as source line number and source code.

  • const express = require("express"); const app = express(); const port = 3000; const path = require("path"); const { execSync } = require("child_process"); // function to download the repo const downloadRepo = (repoURL) => execSync(`git clone ${repoURL}`, { stdio: [0, 1, 2], cwd: path.resolve(__dirname, ""), }); // route to clone the repo app.get("/:repoOwner/:repoName", async (req, res) => { const { repoOwner, repoName } = req.params; // composing the repo URL to be downloaded const fullRepoURL = `https://github.com/${repoOwner}/${repoName}.git`; // downloading the repo in the root folder await downloadRepo(fullRepoURL); // returns the FULL URL of the repo in the frontend res.send(fullRepoURL); // trying to return the repo's content in the the frontend // I get status 304 (not modified) res.sendFile(path.resolve(__dirname, repoName)); }); app.listen(port, () => { console.log(`App listening at http://localhost:${port}`); });

  • isomorphic-git

    A pure JavaScript implementation of git for node and browsers!

  • I recently had to implement git cloning into a full stack project and I found a very useful library OP can use. isomorphic-git which would solve this issue and allow them to clone into a virtual filesystem which can help save speed, storage, and possibly keep it secure. Plus if the memfs package is used the OP can just dumb the JSON of the Volume object into the request.

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • How (not) to contribute to open source

    3 projects | dev.to | 25 Jan 2024
  • ChatGPT is Indeed the "Iphone Moment for AI" - Some Thoughts on Microsoft, Alphabet and AI.

    2 projects | /r/wallstreetbets | 19 Jan 2023
  • Merging Pull Requests Like a Pro With Mergify

    3 projects | dev.to | 17 May 2022
  • Working with Packages and Libraries in ASP.NET Core

    3 projects | dev.to | 25 Aug 2021
  • Google Keep Clone with Django and Vanilla JavaScript

    2 projects | dev.to | 6 Mar 2021