anteknik/express-blog

Simple blog engine built using ExpressJS and NodeJS for learning purpose.

dev-master 2018-08-24 10:08 UTC

This package is not auto-updated.

Last update: 2024-05-25 16:17:35 UTC


README

Total Downloads Latest Unstable Version License NPM Version NPM Downloads

This repository contains a sample implementation of a simple blog engine with NodeJS and ExpressJS.

Dependencies

Before you can run a blog , make sure some things have been there :

  1. MySQL database , with the model in accordance with the existing table in the 'data' directory.

  2. The Environment following variables are configured :

    a. 'DB_HOST', contains hostname of the database system.

    b. 'DB_USER', contains lists of users who can access the database.

    c. 'DB_PASSWORD', contains user passwords in (b).

    d. 'DB_BLOG', contains the name of the database that will be used.

In terms NodeJS , before installing dependency through 'npm' , first run the following command (Windows):

$ npm install -g gulp
$ npm install -g node-gyp

for Linux and Mac users, use sudo :

$ sudo npm install -g gulp
$ sudo npm install -g node-gyp

After the command exits, install dependency with the command :

$ npm install

both Mac, Windows, or Linux.

Running Blog

There is only one command to run a blog, namely :

$ gulp server

And the blog will be accessible in the http://localhost:3000/