Skip to content

igreatdev/hapijs-hello

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HapiJs-hello

Sample HapiJs Example to run on a docker container

Build docker image

After cloning this repo, run the below docker command in the project dir.

$ docker build -t /hapijs-hello .

To confrim that the image was built successfully, run the code below:

$ docker images

This will give you the list of images. If your build was successful you should see /hapijs-hello in the list.

Run the docker image

Run the following code to start your docker image:

$ docker run -d -p 3000:3000 /hapijs-hello

Test the app

You can get the port of your app with the following code:

$ docker ps

Example

ID IMAGE COMMAND ... PORTS ecce33b30ebf /hapijs-hello:latest npm start ... 3000->3000

Now you can call your app using curl

$ curl -i 0.0.0.0:3000

If everything works out well, you should get a 200 Ok response with Hello world!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published