Skip to content

ytjchan/my-simple-postboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My Simple Postboard

A postboard website with a client/server model which supports CRUD operations by using HTTP GET, POST, PUT, DELETE requests. It's mobile compatible too.

  • Now deployable on Heroku:
  • TODO: Support for emoji posts.
  • TOOD: Post using AJAX instead of traditional forms for better script control?
  • TOOD: Make a preview picture.

Prerequisites

Usage

Installation

In project directory, call the following node command to install the necessary dependencies:

node install

Create config.js in the project directory with the following content:

module.exports = {
    host: 'localhost',
    user: 'USERNAME HERE', // put your username here
    password: 'PASSWORD HERE', // put your password here
    database: 'my-simple-postboard'
};

Run the setup.sql in MySQL to prepare the necessary tables.

Execution

In project directory, call the following node command to start the server:

node index.js
# Output:
# My Simple Postboard listening on port 3000! (or another port if specified)
# Connected to database!

Navigate to localhost:3000 (or a corresponding port) to visit the postboard.

Technologies used

Frontend - stylesheets and JavaScript libraries

There are imported in head.pug and scripts.pug from their official CDNs.

  • Boostrap 4 - a easily reusable CSS stylesheet sheet with optionally Javascript interactivity.
  • jQuery - a JavaScript library for DOM manipulation.
  • SweetAlert 2 - a beautiful JavaScript replacement for vanilla popup boxes.

Backend - Node dependencies

  • Express - a Node framework for setting up the web server.
    • body-parser - a Express.js middleware for interpreting HTTP request bodies.
  • mysqljs - a Node module for connecting to the MySQL database.
  • Pug - a template engine and language to dynamically generate HTML web pages.

About

A postboard website providing CRUD operations.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published