V
V
vaservaser2019-07-15 15:31:07
Node.js
vaservaser, 2019-07-15 15:31:07

How to organize development on NodeJs/NestJs/Vue/Ubuntu?

I have an Ubuntu VPS that has Nginx, NodeJs and NestJs installed for the frontend (Vue) and backend.
I'm still just learning this stack, making a simple application. Everything works, but I'm not satisfied with the development process itself.
How does it look for me now. The working machine is Windows. I launch the terminal via SSH (Putty) to overload Nginx, as well as the NodeJs processes responsible for the front and back. There is also little pleasure: I
ps aux | grep node
look for the front and back and nail it according to PID:
sudo kill -9 pid
and restart

бэк: npm run start
фронт: npm run serve

Not very comfortable. This time.
I edit the front and back code itself through Visual Studio Code via the SSH-FS plugin directly on the live server. I understand that this is wrong.
Therefore, I ask you to advise, suggest how to properly organize the development process so that it is in accordance with Feng Shui. What tools to use?
How I imagine it. You need to raise Gitlab or Bitbucket to store the code for the back and front.
Raise the project on the local machine, synchronize it with the version control system, and push the changes.
And how to automatically push these changes to the server? Stop processes manually, then git pull, start both services for the front and back ... How to do all this correctly?
We are skipping the tests for now, although we are already ready to be stoned.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
R
Robur, 2019-07-15
@vaservaser

Have you ever written in php before? :)
Do the development locally - run the server on the node and the devserver for vue on your machine, if there is a database, you can connect the remote one.
You can directly, you can through the docker if you have any problems due to Windows.
How to make the correct deployment to staging/prod is a separate big topic, first set up a normal development environment and a local process.

K
kr_ilya, 2019-07-15
@kr_ilya

I keep everything locally, I launch 2 consoles for the backend and frontend on different ports, and I upload a ready-made build to the server.
On the server, I also run 2 node processes (front, back) and that's it.

D
dev-sasha, 2020-10-25
@dev-sasha

In addition to other answers, I would advise the following:
1. Switch to Linux (eg Ubuntu), or Mac.
2. IDE from JetBrains - WebStrorm instead of VS. (It is convenient to work with databases out of the box. Much is already out of the box and you don’t have to fool around with plugins, although there are also many plugins).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question