So yea, this is a thing
To host, run the installation commands in console
npm i
Now its hosted on https://localhost:3000
You have set up the frontend part just using those commands, hooray! But you still need to set up the backend
Download an apache + mysql server host. I preferably use xampp which has a configurable apache and mysql server dashboard which is easy to set up
All following steps are based on xampp
Launch both the apache server and the mysql server
Once it looks like the image above, go to http://localhost/phpmyadmin/
and upload the database.sql
file from the main directory
Press the User Accounts
button in the topbar and locate root localhost
and press Edit privileges
Click "change password" and designate the root account a password
After you've changed the password, go back to xampp and click Apache > Config > phpMyAdmin (config.inc.php) and change this line
$cfg['Servers'][$i]['password'] = 'yourNewPassword';
In the project files, rename the .env.dist
to .env
and edit the values below
dbPassword=""
secret=""
cookieSecret=""
apininjas=""
API NINJAS - YOU MUST HAVE A VALID API KEY
Congrats, you've successfully set up the backend and you now have a fully set up server.
Now, run the startup command below to start your server
npm start
Honestly idk how they work, so go figure it out for me