Sample Blog with Node.js (ExpressJS) and MySQL
Step 1. Clone files from repository
Step 2. Create environments and environments.js
environments
MYSQL_DATABASE={Database Name}
MYSQL_USER={User}
MYSQL_PASSWORD={Password}environments.js
exports.MYSQL_DATABASE = "{Database Name}";
exports.MYSQL_USER = "{MySQL User}";
exports.MYSQL_PASSWORD = "{MySQL Password}";
exports.BLOG_NAME = '{Blog Name}';
exports.BLOG_HOME_DESC = '{Blog Description}';
exports.MAIL_PROVIDER = '{Mail Provider}';
exports.MAIL_SENDER_USER = '{Mail address that you want to use to send mail from}';
exports.MAIL_SENDER_PASSWORD = '{Password for Mail Sender}';
exports.MAIL_RECEIVER_USER = '{Mail address that you want to receive email}';
exports.MAIL_RECEIVER_PASSWORD = '{Password for Mail receiver}';Step 3.Start MySQL by command below and Create Database from docs/db_configuration.sql
$ docker-compose up -dStep 4. Run following command to start application
$ npm install
$ npm startStep 5. Get your OpenWeather API Key from OpenWeather and Set your location and key at Profile page
Step 6. Enojoy!!
Username: root
Password: admin- Use this wizard to create or select a project in the Google Developers Console and automatically turn on the API. Click Continue, then Go to credentials.
- On the Add credentials to your project page, click the Cancel button.
- At the top of the page, select the OAuth consent screen tab. Select an Email address, enter a Product name if not already set, and click the Save button.
- Select the Credentials tab, click the Create credentials button and select OAuth client ID.
- Select the application type Web Application, enter the name that you like, and click the Create button.
- Click OK to dismiss the resulting dialog.
- Click the ⬇️ (Download JSON) button to the right of the client ID.
- Go to your admin potal's Profile page and copy and past downloaded client ID json file.
- After update your profile, you will see Email at side menu and click it.
- Then you should see red button with Authorize text.
- You click it and you will allow your google account to allow full permission
- After you that, you are good to go and you can read, writer and modify your email!