Sign inSign up

vergissberlin/node-webserver

By vergissberlin

Updated over 8 years ago

Minimal webserver with node js

Image
0

10K+

vergissberlin/node-webserver repository overview


node-webserver


Provides a minimal webserver (via Express.js) to expose static files from the Docker host via HTTP. This image is build on Alpine Linux (base image alpine:node) and aims for a minimal size.

Usage

You can expose a local directory which you want to have served via the mini-webserver by starting it with

docker run --name node-web -p 8080:8080 -v /path/to/local/folder:/app/public:ro -d netresearch/node-webserver

In this example, the port on the docker host where the node-webserver is reachable is 8080.


Customization

You can override customize.js <customize.js>_ in order to customize the express application <http://expressjs.com/en/4x/api.html#app>_.


Logging

The Express.js app uses morgan to pipe the web logs to the STDOUT. This means that the logs are visible via docker logs node-web (if the container name is node-web).

Tag summary

Content type

Image

Digest

Size

22.8 MB

Last updated

over 8 years ago

docker pull vergissberlin/node-webserver