Skip to content

node + express + mysql Many people blog communities

Notifications You must be signed in to change notification settings

taoyage/blogosphere

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

blogosphere

Simple many people Blog example with Express, Xtpl, Mysql

This example covers following topics;

  • express
  • mysql
  • xtpl
  • session
  • routes

Quick links ;

mysql express xtpl

Getting Started

We'll be using an existing application that includes two models, several routes, and several views.

  • Fork and clone this repository

  • Run npm install to install dependencies

    • Use npm start to start your application in development
  • Setup your database (this app already has create mysql database file)

  • install Mysql

    • copy blog.sql content code to create database

Read the Code

After setup, STOP. You're using an existing application, so make sure to read the code and ensure what the application does. Here is some information about the current setup.

  • Routes

    • GET / - Render home page
    • GET /account/login - Get login page
    • POST /account/login - Process the login request
    • GET /account/register - Render reginster page
    • POST /account/register - Process the register request
    • GET /account/logout - Process the logout request
    • GET /article/publish - Render publish article page
    • POST /article/publish - Render publish article page
    • GET /article/details/:id - Render detail article page
    • GET /article/page/:pageNum/:postAmount Get home page article list
  • Models

    • article model
    • user model
      • Use Constructor(class) encapsulation database operation models

TODOS

  • Login
  • Register
  • Publish article
  • Photo upload
  • Edit article
  • User personal homepage
  • Optimization

About

node + express + mysql Many people blog communities

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages