Episode two - electric boogaloo
3/5/20 Step one...still
So, I cheated a bit....
I started last night, but in the interest of documenting the process, I am retrospectively adding this information.
I started thinking about this more properly last night. I logged in to cpanel and checked for terminal access - I think I had to request it through my provider before as they locked access down by default, but they seemed fine about adding it.
I accessed that through the cpanel page and was presented with a terminal window. There, I was able to install nvm. Easy step one - once done, I could type nvm use node to make sure I had a version installed and then nvm alias default node to make sure the nvm version of node was the one accessed by new versions of the terminal.
This all went swimmingly...
Then I looked into installing mongo on the server. This looks like it needs sudo
or su
permissions to do it the easy way. This is when I started thinking about Atlas instead of installing on the server. This seems like it might be useful to learn anyway - we use all of these tools at work, but (probably similarly for most of you), it is already set up and we just build on it
Fortunately, I already have a mongo account, but if you don't you will need to set one up - as I said, there is a free tier you can take advantage of.
You will have to create a new cluster. Once this is provisioned, you can connect to it - mongo will ask you to whitelist an ip and set up a user. Once that is done, you should be good to go.
At this point, you don't need to worry about creating any collections, tables or schemas - as soon as you insert from your app (as long as the connections are all set up correctly), mongo will allow you to connect to the cluster.
I think that will do for today. Next time, we can look at getting a api directory set up and connecting to mongo.
Time for a nap...
Top comments (0)