![Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility](https://cdn.sanity.io/images/cgdhsj6q/production/97774ea8c88cc8f4bed2766c31994ebc38116948-1664x1366.png?w=400&fit=max&auto=format)
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
git-server-repo
Advanced tools
A custom git command which creates a remote repository specifically for git deployments.
npm install git-server-repo -g
Ensure this is installed GLOBALLY in order for it to work as a custom git command
I wanted to setup a git repo on my server which would perform some actions on my code once pushed.
git push ...
commandOn your server/raspberry pi you will have a git repository which accepts commits from other devices (aka your computer where you are working), moves your projects files to your desired directory and then runs a build script on those files (optional).
post-install
in your package.json file?git-server-repo
is more versatile as it does not require that you are using node or npm for your project, specifically.
Example - a C program can be compiled after I push it to my Raspberry Pi.
I want to practice my C programming on my Raspberry Pi but...:
.c files
git server-repo
your/project/.git/hooks/post-receive
file and add whatever commands you would like to execute after a new update is receivedgit push <your-remote> master
your/project
SSH into your server/Raspberry Pi
ssh <username>@<ip/domain>
Enter your password if prompted
$ npm i git-server-repo -g
cd your/project
You can optionally just use the --working-dir
flag and specify your desired directory. Example: --working-dir=your/project
git server-repo
ssh://<your-username>@<your-server-ip>/your/project/.git
nano your/project/.git/hooks/post-receive
You will want to make all your changes BELOW the following comments
#
# DO WHAT YOU WANT WITH THE FILES YOU'VE JUST PUSHED
# example:
#
# $ gcc app.c -o app
#
# The above compiles your app.c file into an executable after each push
Now, in a new terminal window, open the project you've been working on. Ensure there is a git repository already setup for your project
Add your server/Raspberry Pi as a remote in your git repo. This will allow you to push your code to your server/Raspberry Pi
git remote add <remote-name> <your-generated-remote-url>
git remote add raspberry-pi ssh://<your-username>@<your-server-ip>/your/project/.git
git push raspberry-pi master
The above pushes your master branch to the remote repository. Once there, the post-receive file will move your files to the your/project/directory
and run your custom commands
FAQs
A custom git command which creates a remote repository specifically for git deployments.
The npm package git-server-repo receives a total of 0 weekly downloads. As such, git-server-repo popularity was classified as not popular.
We found that git-server-repo demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.