Back-end Server for YesterdayNews project
node | npm | MySQL |
---|---|---|
>=v10.0 | >=v6.0 | v5.7 |
-
Create database
Run your MySQL and create
YesterdayNews
database.CREATE DATABASE IF NOT EXISTS YesterdayNews;
-
Install dependency
cd YesterdayNewsServer npm install
-
Update database configuration
To make connection with your MySQL, update
config/database.js
with your ownmysqlConfig
likehost
,user
andpassword
. -
Import News data
We provide some test news for you to start the service, run the command below to import data.
npm run import
-
Start
npm start
- AUTHENTICATION ERROR
Q:Error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client
A:Fix MySQL to v5.7. Because the newest version updates the encrypt algorithm for password which results the password mismatching.