I am in the process of building a test site using Sharetribe marketplace software.
Its quite crazy really but… what i need to do is:
1. Set up a test server running Node.js (and that is not an apaache / mysql / php server) on my computer (linux> ubuntu > studio)
2. Set up a Github account
3. Set up a server on Render hosting and connect them all
Because.. you need to do this so that you make test edits on you local computer, which then can be uloladed to github – that then feeds those changes to Render live server.
I think this is correct – it seems to be.
How to set up Node.js server on local computer to test site (ubuntu)
Install Node.js Using NVM
https://www.knowledgehut.com/blog/web-development/install-nodejs-on-ubuntu
with XTRAS
1.Sort out bash in command line / terminal
$ touch ~/.bash_profile
(otherwise you get nvm no command)
2. install Node Version Manager
$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
(presume change version
3. install Node
$ nvm install node
4. check both
$ node -version
$ npm –version
5. install node version same as Render / hosts (14.17.0)
$ nvm install 14.17.0
see https://render.com/docs/node-version
maybe nvm install lts
6. Create folder and create file index.js
with:
const express = require(‘express’);
const app = express();
[Text Wrapping Break -BUT DELETE THIS TEXT!!! that took time to work out!!! just leave a line break]
app.get(‘/’, function (req, res) {
res.send(‘Hello World!’);
});
app.listen(3000, function () {
console.log(‘Example app listening on port 3000!’);
});
7. $ npm install express
8. then.. run
$ node index.js
and hopfully see: Example app listening on port 3000!
9. check in browser:
Visit http://127.0.0.1:3000/ on the browser to see this page
