- Install npm and Node.js.
- Run
npm install
in the root directory. - Install MySQL and import the .sql dump file into MySQL.
- Rename
.secrets.js
intosecrets.js
. - Put your MySQL credentials into
secrets.js
. You need to have a password for your user. - See
Other things
below if you're having trouble with setting up MySQL.
- Run
npm run dev
. - Go to
localhost:3000
or127.0.0.1:3000
to view the site.
Run mysqldump -u <user> -p <database_name> > global_poverty.sql
. <user>
should be whatever user you use to get into the mysql terminal, which could be root
or another user. <database_name>
is the name of the database you want to export.
Run mysql -u <user> -p <database_name> < global_poverty.sql
. Notice the arrow is reversed and it's mysql
not mysqldump
.
- You might see a weird error that says
Client does not support authentication protocol requested by server
. This might be because you are running MySQL 8.0. DoALTER USER '<username>'@'localhost' IDENTIFIED WITH mysql_native_password BY '<password>'
, replacing<username>
and<password>
with your username and password for MySQL.