The last few steps of Porting a Github App to Back4App

Viewed 15

I am trying to get a Github Node.js App onto Back4App. It has no databases, it is just an app that needs to run permanently and restart automatically whenever Back4App goes down for maintenance.

From reading, I now realise I need to make a copy of my GitHub project on my local machine first, rather than going straight from Github to Back4App. This is obviously different from my previous host.

This is what I have done so far:

  1. I have made a copy of my Github project on my local machine using ‘$ git clone ’. I have put this in my local directory ‘C:\GIT Local\peerjs-server’
  2. I have b4a.exe in my System32
  3. I have set up my ‘Account Key’ and connected it to my local pc with ‘$ b4a configure accountkey’
  4. I have set up a blank project in my back4app account and named it ‘MyNodeJSApp’.

This is what I still need help with. This is what I need to still do:

  1. I need to work out how to copy my local project in my local folder ‘C:\GIT Local\peerjs-server’ to the correct directories of by Back4App project. I do not know where I should be copying this or how to do it. It is just a node.js project which can be found here: ‘https://github.com/peers/peerjs-server’.

  2. I need to work out how to start my project so it permanently runs on Back4App and will automatically restart if Back4App goes down for maintenance. (There may be a script in these file on here https://github.com/peers/peerjs-server, because this seemed to happen automatically on my previous host.)

  3. I need to know what links I then need to put in my client code. It needs to point to my new Back4App project instead of my old previous host project. It needs the correct port. My old code using my old host was:

    let peer = new Peer(idStr, { host: "rgppeerserver.myoldhost.com", port: 443, /* path: '/myapp',*/ secure: true, debug: 0 });

Can anyone give me some tips on 5, 6, 7?

0 Answers
Related