🍴 Code Transfer

How to upload code to a VPS

Install Node.js

In order to run the app, we will need Node.js installed in the VPS.

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash

nvm install 20

Git Clone to VPS

Note: If using your own code, you will first need to push your code to a remote repository on GitHub.

cd apps
git clone https://github.com/fireship-io/linux-course guestbook

cd guestbook

npm install
npm run build

curl http://localhost:3000

In a separate terminal session, also run Pocketbase:

sudo chmod +x pocketbase
./pocketbase serve

Secure Copy

As an alternative, you can copy the raw files from your local machine to the remote machine.

scp -r /path/to/local/code root@123.45.67.89:/apps/guestbook

Questions? Let's chat

Open Discord