M
M
Marishka972019-12-09 17:12:13
GitHub
Marishka97, 2019-12-09 17:12:13

How to download and run a server on hosting?

In general, I created a repository on GitHub, indicated a link to the domain. Now the file is placed on it. However, there are several questions:
1) How to transfer the node_modules folder to github (because it does not accept folders, you have to manually create and fill them with files, but there are too many folders and it even sounds sadistic).
2) How to run node.js on the hosting (everything is easy on the computer - opened cmd.exe - indicated the path to the folder - registered nodemon app.js and everything works. How to do it on github hosting? ) ?
Thank you!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ivan Shumov, 2019-12-09
@inoise

1. node modules do not need to be in the repository. only package.json
2. github is not hosting. There are Github pages, but it does not accept anything other than static package.json

V
vaflya, 2020-01-11
@vaflya

Do you need to rent a VPS server?
Connect to it from the command line via ssh
Install node.js
Do a git pull from the desired repository
and then everything is as usual:

nmp i
npm start

If the code in the repository changes, reconnect to the server, do a git pull and a new npm
ps command: This is the easiest option

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question