Learning Node & Express by building a chat application - following an O'Reilly
course and adding my own
experiments along with it.
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
[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.
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
flag, review Docker's documentation.
A server framework for Node web applications. Learn more here.
A front-end framework for web app design. Learn more here.
A view engine for Node. Learn more here.
Jade -> 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
Body parsing middleware for Node. Learn more here.
Utility function library. Learn more here.
Generates unique identifiers. Learn more here.
more. Learn more here.
Debugging toolbar for express. Learn more here.
HTTP request logger. Learn more here.