• How to create a local test server for MySQL using Express and React?
    12 replies, posted
In the past when I've worked locally and wanted to test some MySQL I'd use MAMP, which worked perfectly with the simple PHP sites I was making. Now I'm using React and Express, and have the basic API routes all down, but have no idea how to access MySQL. I've already read online about installing the mysql package and importing it and how to connect to the localhost db and everything, but I have no idea how to actually establish and create this database to connect to. Do I need to actually go to MySQL's website and download the .dmg to install it to my computer? Will MySQL run on a seperate local server on a different port from Express and React?
So I was unaware that mysql ran on another, different, server. Downloaded and got it all running and working now!
Nice that you got it all figured out. You can set up a "staging" api server that is only used for testing purposes, or you can run your api locally. The benefit of hosting your staging server is that when working on teams, everyone is the same data and reduces the chances of things looking broken because you messed with your data locally
I would recommend ditching mysql for (mongodb / mongoose) much easier to use in node.js apps.
Switching database just because some implementation is 'easier' is a horrible idea, instead you should look into what kind of data you're storing and pick the right choice accordingly. Also Sequelize exists.
Also you're going to fall into every MongoDB noobtrap if you switch for that reason.
But, that's what every hot new start up is using!! MEAN STACK YO
All about Spring / Kafka microservices now isn't it? Startups going full enterprise. It's a great setup to use though, actuslly.
we should just make our own database softwares!!
I'll take writing a plain JSON object as a file structure for $500
Is it web scale?
Only on Docker
memorymappedsql
Sorry, you need to Log In to post a reply to this thread.