How to migrate a proxy NPM repository in Nexus 3? - javascript

I have a Nexus 3 installation with these NPM repos defined:
npm-all (group)
npm-internal (hosted)
npmjs-org (proxy)
I would like to be able to populate the npm proxy repository on an Internet connected machine, and then migrate it to a Nexus Server running on a disconnected machine. Nexus 3 has a Task to backup/restore the entire underlying Orient database, but I can't find a way to do it for a specific repository. My goal is to have a npm proxy repo that's populated with NPM packages I need, in an offline environment.

As far as I know there is no way to do this with any built in mechanism. Your best bet is to publish all packages you need to a hosted repository or alternatively just have the proxy repo and server connected to the internet during provisioning but take it offline afterwards.

You can use this npm tool.
Using this tool download the artifacts from the repositories and upload them in the offline server
Disclaimer, I’m the author of this package

Related

npm build a vue app and run it on a raspberry Pi

I am creating a Vue app with my roommate and we want to deploy it on our raspberry Pi.
Is there a possibility to npm build our final app on our PC and just start the server on the Pi without having to build the app on the Raspberry? And if so, how can we start the app on the Raspberry?
Thank you in advance!
Totally possible. Build your vue app on your PC (known as development environment) and host it on you raspberry pi (production environment). There multiple ways to do this, but from a high level perspective you just need to:
Set up you pi like normal by installing the preferred OS
SSH into the pi from your PC
Install a webserver. For Vue a quick fix could either be Nginx or Apache
You can install both Node and Git on the webserver through SSH. Then you can git clone the app right into the correct folder. Then with Node installed on the server you can run your npm commands like normal and build the Vue site on the server with npm run build. Otherwise you can just copy your build/dist folder to the server, but then you might need to do some extra configuration.
Get a domain name and point it to your raspberry pi's IP (https://www.noip.com/ is a good free choice I think)
A good list of tutorials to follow is:
How to set up SSH on a raspberri pi
How to set up Nginx or Apache on a raspberri pi
How to deploy a Vue app to a webserver (check both Nginx and Apache). There are some good videos on youtube to check out
Pointing a domain name to my raspberry pi website
NB: One last very important thing to remember is that if you're going to expose your webserver to the internet via your home network (using your own internet at home), you might expose your router to the world, which could enable malicious actors to get into your PC and any other device connected to your network. You might need to think about installing a firewall to prevent this. So maybe check out some research on that too.
Here are some useful links:
https://www.instructables.com/Host-your-website-on-Raspberry-pi/
https://medium.com/#thesabareesh/host-your-own-website-on-a-raspberry-pi-3-e3c8fdb90f90
The result of a vanilla Vue build is a dist directory containing static files.
You can serve them over the network using a static file server: Nginx or Apache for example. The latter I believe is preinstalled in the Raspberry Pi OS and a lot of other distros.
You can also follow this guide as a starting point for Apache.
Also the Vue docs have a page dedicated to deployment.

error while loading shared libraries: libgbm.so.1: cannot open shared object file: Puppeteer in Nodejs on AWS EC2 instance

I'm using a Puppeteer module to scrape some data using Node.js. It was working fine on my Macbook but when I deployed the build on an AWS EC2 instance and hit the route that was scraping data it started throwing an error:
error while loading shared libraries: libgbm.so.1: cannot open shared
object file
sudo apt-get update
sudo apt-get install -y libgbm-dev
Above command fixed my problem. While doing some research on this issue I also found some other useful links which might help someone.
Answer which helped me
Official Puppeteer Github Guide for different Platforms
Medium Tutorial

node.js integration (using npm package kerberos) with kerberized Hadoop cluster

We have a Kerberos enabled Hadoop hortonworks cluster, I have installed node.js on one of the data nodes.I have to make node.js kerberized, to start with I have installed npm package kerberos on the node.js.
What are the other steps I need to follow, in order to connect node.js with kerberized Hadoop tools such as Kafka, Hive etc. If anyone have some sample examples around this, please share Or if you have any other options please share that too.

how to install Socket.io over node.js?

I will need any help i can get to install socket.io over node.js for server.
I have already installed the node from the site. I am interested in step- by step(directory,e.t.c) as i am new to programming.
Thanks in advance
James
The easy way to install socket.io is with npm (Node Package Manager). npm is the default package manager for Node.js.The current Windows installer from nodejs.org will install npm along with Node.js. In Windows OS, open the cmd window and type:
npm install socket.io
This command will install socket.io in the local node_modules folder, which is owned by the current user.
npm can also take optional flags which are described at the npm-install webpage of www.npmjs.org.
In order to test if socket.io is working, try this tutorial: Get Started: Chat application which has been linked to by Beterraba in a comment below your question.

Development VPS where environment (Ruby/Rails, JavaScript/Node.js etc) is pre-installed?

Until now I'm setting up my own development environment with Vagrant/VirtualBox/Chef (Ruby).
I wonder if there is a hosting company that provides pre-configured VPS for...
Ruby/Rails
Javascript/Node
...letting me just choose what I want to have installed and also which linux packages I would like to install in each VPS.
Are there hosting companies providing this?
Heroku has "experimental" node.js support (and obviously Rails).
http://blog.heroku.com/archives/2010/4/28/node_js_support_experimental/

Categories