Giter Club home page Giter Club logo

my-simple-postboard's Introduction

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.

my-simple-postboard's People

Contributors

ytjchan avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.