Public | Automated Build

Last pushed: 5 months ago
Short Description
Learning Node & Express by building a chat application
Full Description

node-express-chatapp

Learning Node & Express by building a chat application - following an O'Reilly
course
and adding my own
experiments along with it.

Getting Started

Unlike the course that I am following, this app is containerized using Docker. In order to run this on a machine with Docker, execute
the following command:

docker run -d -p [local port]:3000 urbanblight/node-express-chatapp

where [local port] is the port number on your machine that you would like to
map to the port within the container on which the Node application is listening.
The application currently listens on port 3000, although I imagine I will make
that value configurable at some point.

To verify that the app is working, simply make a request to
[docker machine ip]:[local port] via CURL or http in a browser, where
[docker machine ip] is the ip of your Docker machine.

Configuration

To run this application in production (not recommended, but referenced in the
course), set the NODE_ENV environment variable to the container:

docker run -d -p [local port]:3000 -e "NODE_ENV=production" urbanblight/node-express-chatapp

For information on setting environment variables in the container and the -e
flag, review Docker's documentation.

Dependencies

Node

A JavaScript runtime environment. Learn more here.

Express

A server framework for Node web applications. Learn more here.

Bootstrap

A front-end framework for web app design. Learn more here.

Pug

A view engine for Node. Learn more here.

Jade -> Pug v2

It seems that this course was created after Jade's move to Pug,
but the course doesn't account
for it. Therefore, I have used Express' instructions on implementing Pug.

Pug v2

I am going through this course at the time that Pug 2 was released, which
changes some syntax. See the full migration guide
for details.

body-parser

Body parsing middleware for Node. Learn more here.

lodash

Utility function library. Learn more here.

node-uuid

Generates unique identifiers. Learn more here.

jQuery

Javascript library for DOM manipulation, Ajax, event-handling, animation and
more. Learn more here.

express-debug

Debugging toolbar for express. Learn more here.

morgan

HTTP request logger. Learn more here.

Docker Pull Command
Owner
urbanblight

Comments (1)
sgwatdh
a year ago

Having an issue when navigating to the Chat Room or Users links on the index page of the express app.

http://imgur.com/NEtDoqX