S
S
smooth6662021-12-23 16:48:27
Unit testing
smooth666, 2021-12-23 16:48:27

How can a frontend developer test a local server?

Hello, my friend and I are developing a pet-project, and we are faced with the fact that he cannot test his work, because the database is on my PC. Now he just pushes updates, and then I already test on my PC (very bloody). We thought of throwing it on a free hosting so that it also had access to the database, but developing in this way is also not an option. I'm sure there is an adequate solution, but I don't even know how to search.

Answer the question

In order to leave comments, you need to log in

6 answer(s)
P
pfg21, 2021-12-23
@smooth666

this is only if the test task fits into the limits of a free / cheap VPS (~ a couple of hundred a month is not much).
otherwise, keep one computer running for testing.
but we do not bypass the opponent's access to this machine. those. this computer should have a white IP (even if dynamic, you can perfectly bypass using DDNS)
or IPv6 for both,
or the option to install Teredo / Miredo, it gives an ipv4 tunnel with IPv6
or a "direct" VPN (sometimes it even turns out to break through provider NAT)
or VPN through VPS, if both behind impenetrable Nat.
many options. read-study.

V
Vladimir Korotenko, 2021-12-23
@firedragon

hmm what's the problem?
folders are created in your project
sql
sql\up
sql\down
In up migrations are added
in ascending order In down in descending order
Let the format be the number of the ticket (date) + description
The files themselves are divided into 2 types modification of the schema and filling \ deleting data
As a result, pulling up the changes you just execute the script(s) and get the actual database

D
Drno, 2021-12-23
@Drno

Exist. Rent a VPS, put the whole project there.
Why is the idea of ​​putting on hosting not an option?
Either your PC must have a white IP from the provider so that it can enter

S
Saboteur, 2021-12-23
@saboteur_kiev

If your provider provides a white IP address service, then it's not a problem to simply share access to the database by IP address.
If you are embarrassed that the computer must be turned on all the time, then you can simply use hosting.
Moreover, such databases as mysql can be used not only by ordering a virtual machine, but also with a regular shared hosting, you can also use a ready-made server to which you will connect.

L
LLIypLLIuk, 2021-12-24
@LLIypLLIuk

As noted above - you can and usually should use migrations to track changes in the database.
you can also, as a crutch option, throw the database into the docker container, this container into the git, and push file changes, and let the comrade pull himself and test.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question