Skip to content

bradgarropy/nwa

Repository files navigation

Node Web Application - Template!

Build Status NSP Status

NWA

This template is a continuation of the node-only-server I created. The goal was to extend that learning experience into an actual template I could use to produce web applications faster. Hope you like it!

When I set out to build this template, I wanted to mimic a real application environment as much as possible. To that end, I've created a continuous integration workflow for this app using Travis CI and Heroku. The strategy was to have two branches, master and dev, which are both automatically built and deployed to Heroku anytime changes are pushed.

Continuous Integration

Continuous integration is done by linking Travis CI with this GitHub repository. You can see here that I'm building both branches anytime change is committed. My build process is very simple, just run jshint and nsp to check for basic syntax and security issues.

Deployment

I decided to go with Heroku for my cloud hosting platform, as it is completely free and offers integration with GitHub and Travis CI. I configured a "pipeline", which tracks my master and dev builds, and deploys them if the build succeeds. You can find both environments up and running here:

Each application has its own URL, and I took advantage of the NODE_ENV variable to place a development banner in the staging application.

Sooo What Is It?

This web application integrates multiple technologies to deliver a base set of features required of a web server.

Technologies

Features

  • User Management
    • Database Schema
    • Registration
    • Login
    • Logout
    • Profile Update
    • Password Change
    • Password Reset
  • Flash Messages
    • Success
    • Info
    • Warning
    • Error
    • Danger
  • Secure
    • Loads secrets from .env file
    • Uses secure HTTP headers

Usage

First, clone the repository.

git clone https://github.com/bradgarropy/nwa.git

Next, install the dependencies.

npm install

Then, start the web server.

npm start

Finally, navigate to the site.

localhost:3000