Simple Blog Engine
, (*1)
This repository contains a sample implementation of a simple blog engine with NodeJS and ExpressJS., (*2)
Dependencies
Before you can run a blog , make sure some things have been there :, (*3)
- MySQL database , with the model in accordance with the existing table in the 'data' directory.
-
The Environment following variables are configured :, (*4)
a. 'DB_HOST', contains hostname of the database system., (*5)
b. 'DB_USER', contains lists of users who can access the database., (*6)
c. 'DB_PASSWORD', contains user passwords in (b)., (*7)
d. 'DB_BLOG', contains the name of the database that will be used., (*8)
In terms NodeJS , before installing dependency through 'npm' , first run the following command (Windows):, (*9)
$ npm install -g gulp
$ npm install -g node-gyp
for Linux and Mac users, use sudo :, (*10)
$ sudo npm install -g gulp
$ sudo npm install -g node-gyp
After the command exits, install dependency with the command :, (*11)
$ npm install
both Mac, Windows, or Linux., (*12)
Running Blog
There is only one command to run a blog, namely :, (*13)
$ gulp server
And the blog will be accessible in the http://localhost:3000/, (*14)