Vole is a simple tester to test your web deployment. It is basd on expressJS backend web sever. The home page uses the bootstrap CSS.
Pre-requisite is that node is installed on developer machine. Execute the following commands:
$ git clone https://github.com/htxsg/vole.git
$ cd vole
$ npm install basic-auth
$ npm install cookie-parser
$ npm install axios
$ npm install body-parser
$ sudo npm install nodemon -g
Note:
- basic-auth is for basic HTTP authentication if needed
- cookie-parser as the name describe is to parse cookie.
- axios is a http client to perform API calls.
- body-parser Parse incoming request bodies in a middleware.
- nodemon is for development purpose to auto reload with code change.
In the vole directory run the following command:
nodemon app.js
With nodemon, one can edit the code with the node server is running and it will automatically refresh without needing one to restart. Really useful for development.
-
This repo contains a
Dockerfileto run a nodeJS in a docker container. -
To build the container image locally:
$ docker build -t vole .
- Execute the following command to run the docker container:
$ docker run -p 8888:80 vole
server is listening on 8888
when the container is up, open your browser and go to the following URL: http://localhost:8888
- Note that
nodejscontainer cannot exit wihtCTRL-Ccommand. Open another shell, look for running container and stop it:
$ docker ps -a | grep vole
cd8962478178 vole "docker-entrypoint.s…" 23 seconds ago Up 22 seconds 0.0.0.0:8888->8888/tcp blissful_faraday
$ docker stop cd8962478178
- CSS
- Express Web Framework
- Runnning HTTPS Server
- HTTPbin for testing of HTTP calls