Tuesday, April 7, 2020

LAN enabled Node.js server with npm

Please note: you need to have Oracle VM virtual box installed before doing any of this.

Step 1: Download the .ova file from https://www.turnkeylinux.org/nodejs
Step 2: Execute the file.
Step 3: Follow the screen steps (I.e. setup passwords, etc...)
Step 4: Access the /var/www/ dir via ftp client (I.e. FileZilla) and upload your app files
Step 5: Access /var/www/ via SSH (the SSH address is shown in the vm screen + root as username)
Step 6: Remove the modules dir from your app
Step 7: Run npm install and wait for modules to be installed
Step 8: Open web shell and go to /var/www
Step 9: Install dependencies with npm install
Step 10: Build your app with npm start

Now your test site should be accessible via generated-ip:1234

Please note: if for some reason the build fails, delete the node modules folder and do npm install

No comments:

Post a Comment