Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6347579
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T21:14:40+00:00 2026-05-24T21:14:40+00:00

Here’s what I’d like to do in concept: Hook node.js to a particular Git

  • 0

Here’s what I’d like to do in concept:

“Hook” node.js to a particular Git repository so that I can make a request like /84de7e8d8ce33/foo and the server will (if necessary) check out commit 84de7e8d8ce33, start up another node.js on the files it just checked out, and pass “/foo” to that new server. Of course, the main server keeps track of which commits it already knows about.

Basically, I’m just trying to simplify our release process, so the same server that does the above Git magic will also serve an index.html-like file that consists almost entirely of

<script src="/84de7e8d8ce33/app.js"></script>

My questions:

  1. Just how bad an idea is this?
  2. Is there some prior art, some library or framework that already does this?
  3. Is there an alternative? Some way that I have a release branch, tell node.js what commit to use, and let it go.
  4. Is there some built-in way of keeping multiple commits “checked out” (or at least visible as ordinary files in some fashion) at the same time?

(I have a subsidiary question about how to communicate, from me, as the release manager, to the server the fact that 84de7e8d8ce33 is now the live version. Right now, I’m thinking, memcached, but I’m open to other suggestions.)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T21:14:41+00:00Added an answer on May 24, 2026 at 9:14 pm

    It doesn’t sound like a bad idea at all. I would first try using https://github.com/libgit2/node-gitteh

    Besides having a cute name, it

    • should be faster than shelling out to git
    • has a javascripty API

    I would run it in a separate process from the web server, using node-redis and/or dnode to communicate.

    Edit: I found the docs, listed at the bottom of the README. Not until after I looked at an example and played with it in the node repl, though! It’s quite nice. I was able to poke around and get a blob out of my repo. Also it works on .git, not a working tree, so you might be able to have multiple possible commits without having multiple copies of the repo.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here's the scenario: I have a local git repository that mirrors the contents of
Here's a coding problem for those that like this kind of thing. Let's see
Here's the situation, i want to have a user that can enter time on
Here's a basic regex technique that I've never managed to remember. Let's say I'm
Here is the issue I am having: I have a large query that needs
Here's my scenario - I have an SSIS job that depends on another prior
Here is the scenario: I'm writing an app that will watch for any changes
Here's a strange question for you guys, I have a nice sorted list that
Here's a query that works fine: SELECT rowid as msg_rowid, a, b, c FROM
Here is my code sample, let me know if it can be further improved?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.