- jen chan
This was so intimidating that I'm just recording what I did so I can remember. Thanks to Conan Lai @letmelol for onsite assistance and this Mopsled blog from 2015, which you should really read instead of my post which only details the terminal commands I used.
(For more info See "NFSN Configuration" in Mopsled's post)
- Make a NearlyFreeSpeech account.
- Create a password
- Create a RSA key if you don't have one, run
ssh-keygen, which generates a public and private key. You'll need the public one
- Go to Profile > Add SSH
- To copy your public key, run
pbcopy < ~/.ssh/id_rsa.pubin the terminal
- Paste your key into the input box, and click Add SSH Key
Preparing my app
My app is a Vue-cli with express server: At this point I had the front end in a different folder than the backend. Two different projects with two package.jsons!
- In my front-end project, compile the build into a /dist or /build folder with
npm run build
- Copy and paste the folder into my server side project folder (express app)
- In my
app.use(express.static ('dist/'))to point the backend at my public directory
package.json, I could add a script to run the app
(Also refer to Project Setup)
ssh to my server to get in
To "upload" all your files to the server, copy everything into
rsync -av ./ firstname.lastname@example.org:/home/protected
./indicates "everything in this folder" as the local path, and
email@example.com:/home/protectedis the remote path.
Alternately, I could use
scp -r ./ username_websiteNickname@ssh.phx. nearlyfreespeech.net:/home/protected
Remember to keep a space between local and destination paths.
Apparently rsync is really cool because it only updates what's changed/new in your files.
Make It Live
- See ["Configure NearlyFreeSpeech.net Daemon" and "Configure Proxy"] on Mopsled's post(http://www.mopsled.com/2015/run-nodejs-on-nearlyfreespeechnet/)
In a total duhh moment I found that scheduled tasks are listed in the GUI. I went to Sites, and on the left hand side I found a sidebar listing "Scheduled Tasks" where the
tls.setup task was listed, with a "Remove" button to the right hand side.